Tarik Palic

Tarik Palic

  • NA
  • 17
  • 1.5k

Modify entity afrer InsertOnSubmit

Jun 10 2018 7:35 AM
Hello everyone,Lets say I have a situation like this:var x = db.table.firstordefault(x=> x.something);If (x == null) { x = new someObject(); x.property1 = 1; x.propertt2 = 2; db.table.insertonsubmit(x); } x.property3 = 3; x.property4 = 4; db.table.submitchanges();My question is: Are property3 and property4 always going to be saved to the db?I would test this myself, but dont have access to the actual code.Thank you very much P.S. Is there a way to format the code? I'm posting fro my phone.

Answers (1)