I am having a problem with this query it's throwing an error.
var TotalToDatePayable = ( from ori in db.GetAll<WMPORI>()
where ori.CTMSysID == ctmSysId
select ori.ExB4Taxes).Sum();
I tried below code from another similar question but that did not solve my problem:
var TotalToDatePayable = (Decimal?)( from ori in db.GetAll<WMPORI>()
where ori.CTMSysID == ctmSysId
select ori.ExB4Taxes).Sum()) ?? 0;