public void Bind() { var data = teamSvc.GetAll(); PagedDataSource pds = new PagedDataSource(); pds.DataSource = data; this.RepTeamList.DataSource = pds; this.RepTeamList.DataBind(); }
public IActionResult Delete(string formModal) { var id = formModal; var superpower = _teamServices.GetById(id); if (superpower != null) { _teamServices.DeleteById(id); var currentTeamList = _teamServices.GetAll(); return(RedirectToAction("ListTeams", currentTeamList)); } else { return(Json("Invalid Id.Try again")); } }
private ICollection <TeamViewModel> LoadTeams() { return(_teamServices.GetAll().ToList()); }