Exemplo n.º 1
0
        public static QuoteViewModel Build(Quote quote)
        {
            var viewModel = new QuoteViewModel();

            viewModel.Text   = quote.QuoteText;
            viewModel.Quoter = quote.Quoter;

            return(viewModel);
        }
Exemplo n.º 2
0
        public static HomeViewModel Build(IEnumerable <OlympicEvent> newEvents, IEnumerable <Record> newRecords, IEnumerable <Competitor> newCompetitors, Quote quote)
        {
            var viewModel = new HomeViewModel();

            viewModel.NewEvents      = EventViewModel.BuildList(newEvents);
            viewModel.NewRecords     = RecordViewModel.BuildList(newRecords);
            viewModel.NewCompetitors = CompetitorViewModel.BuildList(newCompetitors);
            viewModel.Quote          = QuoteViewModel.Build(quote);

            return(viewModel);
        }