like this:
var Person = context.Persons.Find(10);
Persons UpdatedPerson = new Persons ({...});
Person = UpdatedPerson;
context.SaveChanges();
But the Context is 'unchanged'?
like this:
var Person = context.Persons.Find(10);
Persons UpdatedPerson = new Persons ({...});
Person = UpdatedPerson;
context.SaveChanges();
But the Context is 'unchanged'?
var Person = context.Persons.Find(10);
Persons UpdatedPerson = new Persons ({...});
context.Entry(Person).CurrentValues.SetValues(UpdatedPerson);
context.SaveChanges();
UpdatedPerson must have the same key value (10) as Person. This will update all scalar and complex properties of Person but not entities related by navigation properties of Person.