public List <Class> GetAllClassWithPlayers() { //TODO //Listar corretamente as turmas var listClass = Repository.GetAllClass(); //foreach (var c in listClass) //{ // c.ListPlayers = PlayerRepository.GetAllPlayers().Where(p => p.IdTeam == team.IdTeam); //} return(Repository.GetAllClass()); }
public AjaxResult GetAllClass() { var x = HttpContext.Session.GetString("AdminId"); if (x == null) { Response.Redirect("https://localhost:44302/Main/Login"); return(null); } string out_mess = ""; AjaxResult ajaxResult = new AjaxResult(); ajaxResult.Data = cr.GetAllClass(out out_mess); ajaxResult.Message = out_mess; return(ajaxResult); }