开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜