public static EventBoardViewModel Build(IEnumerable <OlympicEvent> olympicEvents)
        {
            var viewModel = new EventBoardViewModel();

            viewModel.Events = EventBoardEventViewModel.BuildList(olympicEvents);

            return(viewModel);
        }
Пример #2
0
        public static EventBoardEventViewModel Build(OlympicEvent olympicEvent)
        {
            var viewModel = new EventBoardEventViewModel();

            viewModel.EventId       = olympicEvent.Id;
            viewModel.EventTypeId   = olympicEvent.EventTypeId;
            viewModel.EventName     = olympicEvent.EventName;
            viewModel.Description   = olympicEvent.Description;
            viewModel.Specification = olympicEvent.Specification;
            viewModel.IconFileName  = olympicEvent.IconFileName;
            viewModel.Records       = EventBoardRecordViewModel.BuildList(olympicEvent.Records);

            return(viewModel);
        }