public void Delete(int id) { var deleteTeam = ctx.Teams.Find(id); if (deleteTeam != null) { ctx.Remove(deleteTeam); ctx.SaveChanges(); } }