Iqueryable <t> (A subinterface of ienumerable <t> ). The LINQ to SQL provider implements the iqueryable <t> interface for querying relational data storage. The C # and Visual Basic compilers compile queries for such data sources into code, which will generate an expression directory tree at runtime. Then, the query provider can traverse the expression directory tree data structure and convert it into a query language suitable for the data source.
Ienumerable <t> directly produces code during compilation, rather than the expression directory tree.
String [] arry = new string [] {"AA", "BB", "cc", "DD "};
Arry. Where (S => S. Length = 2). orderbydescending (S => S). Select (S => S );
VaR B = Arry. asqueryable ();
B. Where (S => S. Length = 2). orderbydescending (S => S). Select (S => S );
For ienumerable <t>
Where <t> (this ienumerable <t>, func <t, bool> ),
Orderbydescending <tsource, tkey> (this ienumerable <tsource>, func <tsource, tkey> ),
Select <tsource, tresult> (this ienumerable <tsource>, func <tsource, tresult>)
Iqueryable <t> encapsulates an expression in func <> outside <>,
Where <t> (this ienumerable <t>, expression <func <t, bool> ),
Orderbydescending <tsource, tkey> (this ienumerable <tsource>, expression <func <tsource, tkey> ),
Select <tsource, tresult> (this ienumerable <tsource>, expression <func <tsource, tresult>)