Explain what is LINQ?
Language Integrated Query or LINQ is the collection of standard query operators which provides query facilities into.NET framework language like C#, VB.NET.
What are the types of LINQ?
Types of Linq are:
List out the three main components of LINQ? Explain what is the extension of the file, when LINQ to SQL is used?
Three main components of LINQ are
Standard Query Operators
The extension of the file used is .dbml.
Explain what is lambda expressions in LINQ?
Lambda expression is referred as a unique function use to form delegates or expression tree types, where right side is the output and left side is the input to the method. For writing LINQ queries particularly, Lambda expression is used.
Explain how LINQ with databases can be used?
LINQ supports XML, SQL, Dataset and Objects. Through LINQ to objects or LINQ to Datasets one can use LINQ with other databases. The objects and datasets take care of database particular operations, and LINQ only needs to deal with those objects and not the database operations directly.
Explain how to assign a lambda expression to a delegate?
Assigning lambda expression to a delegate, For eg:
Delegate int del (int i);
Int j = myDelegate (5); // output j=25
Explain what is the difference between Statement Lambda and Expression Lambda?
Expression lambdas are generally used for constructing expression trees. While Statement lambdas cannot be used to create expression trees.
Explain DataContext classes in LINQ?
DataContext class acts as a bridge between SQL Server database and the LINQ to SQL. For accessing the database and also for changing the data in the database, it contains connections string and the functions.
What are LINQ query expressions?
Query expression is nothing but an LINQ query. It is a combination of query clauses that identifies the data sources for a query. It contains information for sorting, filtering, grouping or joining to apply to the source data. It determines what information should be retrieved from the data source.
Explain what is the purpose of LINQ providers in LINQ?
LINQ providers are set of classes that take an LINQ query which generates method that executes an equivalent query against a particular data source.