public async Task <IActionResult> Delete(int id) { var person = await db.People.FindAsync(id); if (person == null) { return(NotFound()); } db.People.Remove(person); await db.SaveChangesAsync(); return(Ok("Deleted")); }
public async Task <IActionResult> DeletePerson(long id) { var person = await db.People.FindAsync(id); if (person == null) { return(NotFound()); } db.People.Remove(person); await db.SaveChangesAsync(); return(NoContent()); }