public virtual ActionResult Index() { var leagues = _leagueService.GetList(); var model = new LeagueDataSource(); model.Leagues = Mapper.Map <List <LeagueViewModel> >(leagues); model.SetActions(); return(View(MVC.Shared.Views._Grid, model.GetGridModel())); }
public virtual ActionResult LeaguesList(long seasonId) { var leagues = _leagueService.GetList(); var season = _seasonService.GetById(seasonId); var model = new LeagueListViewModel(); model.Season = Mapper.Map <SeasonViewModel>(season); model.Leagues = Mapper.Map <IEnumerable <LeagueViewModel> >(leagues); return(View(model)); }