我需要得到所有bank
的地方BankBranches cityId = filter.CityId > 0
代码:
banks = from bank in banks
where bank.BankBranches.Where(y => y.CityId == filter.CityId).Count() > 0
select bank;
var list = banks.ToList();
错误:
对于类型“System.Linq.IQueryable”[Model.Entities.BankBranch],不允许从“Model.Entities.BankBranch”访问成员“Int32 CityId”。