【发布时间】:2010-10-29 21:03:21
【问题描述】:
这可以在 nhibernate linq 中使用 let 关键字吗? 我写了
var posts = from post in postsRepository.GetPosts(name)
let commentsCount = (from c in NHUnitOfWork.CurrentSession.Linq<Comment>()
where c.Post.ID == post.ID
select c).Count()
select new ...
作为回应,我有
NHibernate.QueryException:无法解析属性:帖子:Sys.Domain.Entities.Post
【问题讨论】:
-
您的评论可能与您的帖子相关联?你不能使用组运算符吗?
标签: c# .net linq nhibernate linq-to-nhibernate