I Am Facing this Error When Decimal Convert issue
The null value cannot be assigned to a member with type decimal which is a non-nullable value type
The documentation for
Convert.ToDecimal says that it converts
0, so it looks like it should work correctly.
--decimal TotalAmount = objTable.Where(x => x.id == XXX).Sum(x =>(decimal?)x.Amount)