Exemplo n.º 1
0
        public static ScheduleViewModel ToViewModel(GCR.Core.Entities.Schedule schedule, ScheduleViewModel model = null)
        {
            if (model == null)
            {
                model = new ScheduleViewModel();
            }
            model.SeasonId = schedule.SeasonId;
            model.TeamId   = schedule.TeamId;
            model.Date     = schedule.Date;
            model.AtHome   = schedule.AtHome;

            return(model);
        }
Exemplo n.º 2
0
        public static GCR.Core.Entities.Schedule ToModel(ScheduleViewModel model, GCR.Core.Entities.Schedule schedule = null)
        {
            if (schedule == null)
            {
                schedule = new GCR.Core.Entities.Schedule();
            }

            model.SeasonId = schedule.SeasonId;
            model.TeamId   = schedule.TeamId;
            model.Date     = schedule.Date;
            model.AtHome   = schedule.AtHome;

            return(schedule);
        }