运行此查询来创建一个恒定值:无法在LINQ查询
var holderAccounts = db.AccountDetails.Include(p => p.BranchDetail)
.Where(p => holder.AccountDetails.Any(a => a.Id == p.Id));
我得到这个异常:
无法创建类型的常量值“CodeFirst.AccountDetail”。只有原始类型或枚举类型在此上下文中受支持。
关系是:
AccountHolder 1 to many AccountDetail 1 to 1 BranchDetail
我在做什么错?
什么是“持有人”? – mellamokb 2013-03-12 18:29:26
持有人是AccountHolder实体的对象 – user1740381 2013-03-12 18:31:09