c# - Summation of data, linq -


i want summarize "count" field "room" , "object code" equal.

any ideas?

enter image description here

i have no idea how context set, table name , dozen other things necessary answer question, use groupby linq method, like:

var results = db.tablename.groupby(x => new { x.room, x.objectcode })                           .select(g => new { g.key.room, g.key.objectcode, count = g.sum(x => x.code) })                           .tolist(); 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -