equivalent of hql coalesce in linq-to-nhibernate
Supposing I have the following hql:
select cast(coalesce(sum(c.Valoare), 0) as decimal)
from Comision as c
where c.User = :user
Is there any way of writing this in Linq-T开发者_如何学Co-Nhibernate?
Can you use the C# null coalescing operator?
(from c in Comision
where c.User = user
select c.Valoare ?? 0).Sum()
精彩评论