Ejemplo n.º 1
0
        public virtual ActionResult Edit(long id)
        {
            var matchDay = _matchDayService.GetById(id);
            var model    = Mapper.Map <MatchDayViewModel>(matchDay);

            return(View(model));
        }
Ejemplo n.º 2
0
        public virtual ActionResult List(long matchDayId)
        {
            var matches  = _matchService.GetList(matchDayId);
            var matchDay = _matchDayService.GetById(matchDayId);

            var model = new MatchDataSource();

            model.Matches  = Mapper.Map <List <MatchViewModel> >(matches);
            model.MatchDay = Mapper.Map <MatchDayViewModel>(matchDay);
            model.SetActions();

            return(View(MVC.Shared.Views._Grid, model.GetGridModel()));
        }