这是否可以使用带有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:无法解析属性:post of:Sys.Domain.Entities.Post
答案 0 :(得分:0)
Comment.Post