6

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.CurrentSession.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

abatishchev
  • 98,240
  • 88
  • 296
  • 433
lkurylo
  • 1,621
  • 33
  • 59

1 Answers1

0

Something wrong with mapping of Comment.Post

abatishchev
  • 98,240
  • 88
  • 296
  • 433