public bool Delete(Person entity) { bool deleted = false; var persontodelete = _context.People.SingleOrDefault(a => a.CaseUserID == entity.CaseUserID); if (persontodelete != null) { _context.People.Remove(entity); int changes = _context.SaveChanges(); deleted = (changes > 0); } else { deleted = false; } return(deleted); }
public void AddDirectoryEntry(Person person) { _context.People.Add(person); _context.SaveChanges(); }