public void DeletePerson(Person person) { using (var db = new PersonContext()) { db.People.Attach(person); db.People.Remove(person); db.SaveChanges(); } }
No comments:
Post a Comment