Senior C # LINQ

LINQ
anonymous type
to create an object, you must first define the type of the object it?

var obj = new { name=“niming”,age=10};

obj type, the external type of process Anonymous Type inaccessible

Linq query the basic operation (query keywords)

from clause : a specified range and variable data source

where clause : screening data from a data source in accordance with the expression bool

select clause : the elements specified in the query results has the type or form of expression

group clauses : query results are grouped by key (IGrouping <TKey, TElement>)

into clause : providing an identifier, it can serve as a reference to join, group, or select clause results

Linq query the basic operation (query keywords)

orderby clause : to check out the elements are sorted (ascending / descending)

join clauses : connecting two data sources in accordance with the two conditions specified matching Equals

let clause : generating a variable range of a sub-expression in the query expression is stored query result

Compound from clause : two-table query

Guess you like

Origin blog.csdn.net/weixin_44370124/article/details/90673228