Sql to NHibernate QueryOver
How can I Convert this SQL to NHibernate QueryOver ?
select k1.Id,k.sm
from tblKarbarg_1 k1
inner join (
select kd.Karbarg_1_id,SUM(kd.MablaghSanad) as sm
from tblKarbarg_1_Detail kd
group by kd.Karbarg_1_id
) K
开发者_Python百科on k.Karbarg_1_id=k1.Id
This depends on your mapping. But here is a very nice list of examples that demonstate the feautures of QueryOver and other methods of querying in NHibernate.
http://www.martinwilley.com/net/code/nhibernate/query.html
精彩评论