这是我尝试针对 EF7 运行的查询
_context.Event.Where(e => e.Invitations.Any(i => i.User.Id == currentUserId));
确实是相当简单的查询,我看不到任何作为条件传递的非 bool 短语。
这里的Event
与Invitation
是一对多的关系。
最佳答案
我正在发布一个被OP接受的答案:看起来sql生成器中有一个已知的错误,团队已经意识到这个错误:
关于entity-framework - SqlException : An expression of non-boolean type specified in a context where a condition is expected, 附近 ')',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34708909/