LINQ to NHibernate and let keyword
Is this possible to use let keyword with nhibernate linq? I wrote
var posts = from post in postsRepository.GetPosts(name)
let commentsCount = (from c in NHUnitOfWork.Curre开发者_运维技巧ntSession.Linq<Comment>()
where c.Post.ID == post.ID
select c).Count()
select new ...
and in response I have
NHibernate.QueryException: could not resolve property: post of: Sys.Domain.Entities.Post
Something wrong with mapping of Comment.Post
精彩评论