public async Task <IActionResult> Results(SelectorDataViewModel model) { var dataReader = dataReaderFactory.CreateDataReader(model.DataType); var data = await dataReader.ReadDataAsync(model.From, model.To); var income = calculator.CalculateIncomes(model.StartAmount, data); var viewModel = new ResultsViewModel(model, data, income); return(View(viewModel)); }
public IActionResult Index() { var model = new SelectorDataViewModel(); return(View(model)); }