LINQ
It stands for Language Integrated Query. By using LINQ we can query database using statements that are built into LINQ-enabled languages such as MS C# and VB 2010.
LINQ works with any collection that implements the IEnumerable or the generic IEnumerable<T> interface. The generic IEnumerable interface has only one method, GetEnumerator, that returns an object that implements the generic IEnumertaor interface. The generic IEnumertaor interface has a Current property, which references the current item in the collection, and two methods, MoveNext and Reset.
The result of the LINQ query is assigned to a range variable called the query object. The data source is not touched until you iterate on the query object, but if you iterate on the query object multiple times, you access the data source each time.
LINQ Providers:
.NET framework comes with a LINQ to Objects provider. The LINQ provider work as a middle tier between the datastore and the language environment.
To create a LINQ provider, we need to implement IQueryable interface. It has a Provider propety whose type is IQueryProvider, which is called to initialize and execute LINQ expressions.
It stands for Language Integrated Query. By using LINQ we can query database using statements that are built into LINQ-enabled languages such as MS C# and VB 2010.
LINQ works with any collection that implements the IEnumerable or the generic IEnumerable<T> interface. The generic IEnumerable interface has only one method, GetEnumerator, that returns an object that implements the generic IEnumertaor interface. The generic IEnumertaor interface has a Current property, which references the current item in the collection, and two methods, MoveNext and Reset.
The result of the LINQ query is assigned to a range variable called the query object. The data source is not touched until you iterate on the query object, but if you iterate on the query object multiple times, you access the data source each time.
LINQ Providers:
.NET framework comes with a LINQ to Objects provider. The LINQ provider work as a middle tier between the datastore and the language environment.
To create a LINQ provider, we need to implement IQueryable interface. It has a Provider propety whose type is IQueryProvider, which is called to initialize and execute LINQ expressions.
Comments
Post a Comment