EF Core IN等效

时间:2018-02-18 17:02:29

标签: linq entity-framework-core ef-core-2.0

LINQ与此相当:

SELECT * FROM [MyItems] WHERE [MyItems].[TheStatus] IN (3,5,14,23)

我试过这样的事情:

DbContext.MyItems.Where(mi => statuses.Contains(mi.TheStatus));

0 个答案:

没有答案