Asp.net 如何使主键等于LINQ中int[]的数组?

Asp.net 如何使主键等于LINQ中int[]的数组?,asp.net,sql,linq,Asp.net,Sql,Linq,我试图选择一个值,其中主ID为int,不等于数组int[]中的任何int 这是我目前的代码: Where(c => !c.CountryId.Equals(model.CampaignCountryIds)) model.CampaignCountryId的类型为int[] 有什么简单的方法可以做到这一点吗?此错误源于: Comparison operators not supported for type 'System.Nullable`1[System.Int32][]'. 谢谢

我试图选择一个值,其中主ID为int,不等于数组int[]中的任何int

这是我目前的代码:

Where(c => !c.CountryId.Equals(model.CampaignCountryIds))
model.CampaignCountryId的类型为int[]

有什么简单的方法可以做到这一点吗?此错误源于:

Comparison operators not supported for type 'System.Nullable`1[System.Int32][]'.
谢谢,
Darren

使用
包含

.Where(c => !model.CampaignCountryIds.Contains(c.CountyId))