public IActionResult DeleteDoctor(int id) { var res = new Doctor { IdDoctor = id }; _context.Attach(res); _context.Remove(res); _context.SaveChangesAsync(); return(Ok("Deleted")); }