public async Task <IActionResult> Delete(int id) { var person = new Person { Id = id }; _context.Attach(person); _context.Entry(person).State = EntityState.Deleted; await _context.SaveChangesAsync(); return(NoContent()); }