Skip to content

Instantly share code, notes, and snippets.

@offpepe
Last active February 24, 2022 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save offpepe/905172f64aac04e6a6dfaa562e4e6017 to your computer and use it in GitHub Desktop.
Save offpepe/905172f64aac04e6a6dfaa562e4e6017 to your computer and use it in GitHub Desktop.
update models
public async Task updateT1 (T update) {
db.Table.Attach(updatedUser);
var entry = db.Entry(updatedUser);
entry.Property(e => e.Field).IsModified = true;
await db.SaveChangesAsync();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment