void Main()
{
// 用法一:轉成 TSQL LIKE
Persons
.Where(w => w.LastName.Contains("T"))
.Select(s => s.LastName)
.Dump();
// 用法二:轉為 TSQL IN
string[] LastNames = new string[] {"Alberts" , "Bennett"};
Persons
.Where(p => LastNames.Contains(p.LastName))
.Select(s => s.LastName)
.Dump();
}
用法一:轉成 TSQL LIKE
用法二:轉為 TSQL IN
沒有留言:
張貼留言