asp.net - Update multiple fields using single linq statement -


i'm trying find out if possible update 2 or more fields using linq.

i've found example shows 1 property updated, i'm unsure how converted.

listofcompany.firstordefault().name = "whatever name"; // desc = "whatever desc" 

any ideas?

just pull entire entity instead of single property.

var myentity = listofcompany.firstordefault(); if(myentity!=null) {    myentity.name = "blah";    myentity.something = "blah 2"; } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -