是否可以在 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: could not resolve property: post of: Sys.Domain.Entities.Post
最佳答案
Comment.Post
的映射有问题
关于c# - LINQ to NHibernate 和 let 关键字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4055902/