public async Task <IHttpActionResult> DeleteTeam(TeamIdModel team) { if (!ModelState.IsValid) { return(InternalServerError()); } try { await services.Remove(team); return(Ok()); } catch (Exception ex) { return(InternalServerError(ex)); } }
public async Task <ActionResult> Delete(TeamIdModel team) { await teamService.Remove(team); return(RedirectToAction("Index")); }