public static MissingPerson findById(int Id) { MPDContext db = new MPDContext(); MissingPerson person = db.MissingPersons.Single(u => u.PersonId == Id); return(person); }
public void delete() { deleteImage(); MPDContext db = new MPDContext(); MissingPerson person = db.MissingPersons.Single(u => u.PersonId == this.PersonId); db.MissingPersons.Remove(person); db.SaveChanges(); }