This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Open database context | |
| using(DbContext db = new DbContext()) | |
| { | |
| //Get the id of the entity we want to update | |
| int id = 1; | |
| //Create an instance of the entity we want to update | |
| SomeEntity entity = new SomeEntity(){ | |
| Id = id, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Open database context | |
| using(DbContext db = new DbContext()) | |
| { | |
| //Get the id of the entity we want to update | |
| int id = 1; | |
| //Create an instance of the entity we want to update | |
| SomeEntity entity = new SomeEntity(){ | |
| Id = id, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Open database context | |
| using(DbContext db = new DbContext()) | |
| { | |
| //Get the id of the entity we want to update | |
| int id = 1; | |
| //Create an instance of the entity we want to update | |
| SomeEntity entity = new SomeEntity(){ | |
| Id = id, |
NewerOlder