标签:sele customers 写法 result class lambda 排序 条件查询 where
1. 简单查询
var result = from c in db.Customers select c;
2. 条件查询
普通 LINQ 写法:
var result = from c in db.Customers where c.Country == "UK" select c;
Lambda 表达式写法:
var result = db.Customers.Where(c => c.Country == "UK");
3. 排序分页
标签:sele customers 写法 result class lambda 排序 条件查询 where
原文地址:https://www.cnblogs.com/zhangchaoran/p/8881589.html