LINQ to objects
Data Source
Text
/
Yan zhongcheng
In the architecture of LINQ to objects, as long as the objects that implement the ienumerable <t> interface can all be used as the data source of LINQ to objects, what kind of architecture does it have? See the following table.
Differences |
Description |
Ienumerable <t> Series |
1. Type struct columns, such as string [], int [], datetime [], and so on. 2. ienumerable <t> is implemented, such as list, dictionary, and collection.. NET Framework 3.5Data Development GuideChapter 3This type is used for demonstration. |
Ienumerable Interface |
1. An object that implements the ienumerable interface can also be used as the data source of the LINQ to objects interface, however, you must pass the cast and oftype functions as ienumerable <t>.Interfaces of LINQ and ienumerableDatareader, arraylist, and other objects can be combined with LINQ to objects in this way.. NET Framework 3.5Data Development GuideIn a workshop, this application is not used much.Cast,OftypeOne worker. |
Iqueryable <t> Interface |
The iqueryable interface is also based on the data source supported by LINQ to objects, because it is a child interface of ienumerable <t>, when the browser discovers the object from the source for the iqueryable <t> interface, the expression tree method is used to process the LINQ lookup method. This is to convert the query expression of LINQ into an expression node and submit it to a specific machine. The expression node is regarded as a command acceptable to other specific systems. For example: 1. LINQ to SQL and LINQ to entities convert expression node into SQL commands. 2. LINQ to Active Directory: Convert expression node to an operation of Active Directory API. 3. The expression node is called as Excel COM in LINQ to excel.. NET Framework 3.5Data Development GuideAt the end of chapter 3, there is a lot of ink on this application and practice. |