public static QuoteViewModel Build(Quote quote) { var viewModel = new QuoteViewModel(); viewModel.Text = quote.QuoteText; viewModel.Quoter = quote.Quoter; return(viewModel); }
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); }