我需要比较并从字符串列表中获取LINQ的匹配值.看看我的代码.
码
Split = Id.Split(',');
List<string> uids = new List<string>(Split);
var model = (from xx in Db.ItemWeedLogs
where xx.ItemNo == uids
// I need to pass a string list to extract the matching record.
select xx).ToList();
Run Code Online (Sandbox Code Playgroud)
试试这个 :
var model = (from xx in Db.ItemWeedLogs
where uids.Contains(xx.ItemNo)
select xx).ToList();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5766 次 |
| 最近记录: |