c# - How to use linq Sum in a dynamic object -
in data access layer have de following query:
var result = income in context.incomes join order in context.orders on income.orderid equals order.orderid select new { voucher = order.voucherseries + "-" + order.vouchernumber, amount = income.incomeamount }; return result.tolist(); in business layer how use linq sum sum amount?
anonymous objects designed used within scope in created. if want able access data outside of current scope should creating new named type has 2 relevant properties need, rather using anonymous type.
Comments
Post a Comment