var Results = from dt in ctx.Customers.Skip(0).Take(10)
select new
...{
dt.CustomerID,
dt.CompanyName,
dt.City
};
2.Like 查询----startwith()
from dt in ctx.Customers
where dt.ID.Startwith('A')
3.In查询----Contain()
string[] s = ...{ "ivan","aaa","aaaa"};
var Results = from dt in ctx.Customers.Skip(0).Take(10)
where s.Contains(dt.CustomerID)
select new
...{
dt.CustomerID,
dt.CompanyName,
dt.City
};
文章来源于领测软件测试网 https://www.ltesting.net/