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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -