Simply LINQ: What,Why and How.
Dec24

Simply LINQ: What,Why and How.

Welcome to CodeSpread! What is LINQ? LINQ is Language-Integrated Query (LINQ). It is primarily an extension to the language’s capability where it adds query expressions which processes objects and data. It is a one stop solution to all the query processing as now there is no need to learn a different query language for each type of data source: SQL databases, XML documents etc. Why LINQ? Type safe. IntelliSense support. Tables...

Read More
IQueryable: Performance boost over remote Data Access
Apr26

IQueryable: Performance boost over remote Data Access

If we also follow the inheritance principle like OOPS programming, we need to extend our previous discussion “IEnumerable: Power behind Collections”. So this will lead us to write something about IQueryable. What is an IQueryable Interface? We can define it as functionality attached to an element which is used to evaluate queries against a known data source of unknown data type. It is available as public interface IQueryable :...

Read More

C#: Anonymous Type is not anonymous!

Why Anonymous Type? Anonymous types provide you the ease of having set of properties (Read only) into a single object without knowing the type. It’s the job of compiler to generate the type information. Anonymous types can be created by using the keyword new. Say: var test = new { Name = “Jackie”, ID = 123 }; Here ‘var’ keyword plays an important role as the type information won’t be available. Anonymous types are mostly used with the...

Read More
C#: Useful JSON in .Net
Dec03

C#: Useful JSON in .Net

Why JSON? All web applications revolve around large chunk of data and availability of that data to our application is of utmost importance. To do that, we have options like fetch data from database and sometimes from XMLs. As a result of which we end up hitting DB/File system several times and ultimately compromises with Page speed and performance. JSON- JSON (JavaScript Object Notation) is the solution to avoid all the difficulties...

Read More