NHibernate QueryOver with ManytoMany

后端 未结 1 1151
小蘑菇
小蘑菇 2020-12-17 01:33

I\'m in the process of learning QueryOver, but I can\'t for my life figure out how to do simple many to many queries.

I\'ve written the following:

           


        
1条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-17 01:43

    I ended up resolving this after a lot of perseverance.

                var result = Session.QueryOver()
                                .Right.JoinQueryOver(x => x.Categories)
                                .Where(c => c.Id == categoryId)
                                .List();
    

    What a mission :)

    0 讨论(0)
提交回复
热议问题