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
Post a Comment