Posts

Showing posts with the label C# | LINQ

C# | LINQ

Image
Language-Integrated Query (LINQ)  in C# is used to work with data access from sources such as objects, data sets, SQL Server, and XML. LINQ stands for Language Integrated Query. LINQ is a data querying API with SQL like query syntaxes. LINQ provides functions to query cached data from all kinds of data sources. The data source could be a collection of objects, database or XML files. We can easily retrieve data from any object that implements the IEnumerable<T> interface. The official goal of the LINQ family of technologies is to add "general purpose query facilities to the .NET Framework that apply to all sources of information, not just relational or XML data". Advantages of LINQ LINQ offers an object-based, language-integrated way to query over data no matter where that data came from. So, through LINQ we can query database, XML as well as collections.  Compile time syntax checking It allows you to query collections like arrays, enumerable classes etc. in the native l...