标签: c# entity-framework
是否可以在实体框架查询中合并原始sql条件?
例:
var items = db.Posts.where(x => x.UserId == userId); items = items.where("posts.foo = ?", bar); return items.ToList();
答案 0 :(得分:0)
不支持。唯一的接近方式是:
var items = p in posts where p.foo == bar select p