public virtual ActionResult Edit(long id) { var league = _leagueService.GetById(id); var model = Mapper.Map <LeagueViewModel>(league); return(View(model)); }
public virtual ActionResult List(long leagueId) { var league = _leagueService.GetById(leagueId); var teams = _teamService.GetList(leagueId); var model = new TeamDataSource(); model.League = Mapper.Map <LeagueViewModel>(league); model.Teams = Mapper.Map <List <TeamViewModel> >(teams); model.SetActions(); return(View(MVC.Shared.Views._Grid, model.GetGridModel())); }
public virtual ActionResult List(long seasonId, long leagueId) { var season = _seasonService.GetById(seasonId); var league = _leagueService.GetById(leagueId); var matchDays = _matchDayService.GetList(leagueId); var model = new MatchDayDataSource(); model.Season = Mapper.Map <SeasonViewModel>(season); model.League = Mapper.Map <LeagueViewModel>(league); model.MatchDays = Mapper.Map <List <MatchDayViewModel> >(matchDays); model.SetActions(); return(View(MVC.Shared.Views._Grid, model.GetGridModel())); }