public async Task <AllRunsViewModel> Handle(GetAllRunsQuery request, CancellationToken cancellationToken) { var runs = _runData.GetAll(); var runsDto = _mapper.Map <IEnumerable <Run>, IEnumerable <RunDto> >(runs); var allRunsViewModel = new AllRunsViewModel { AllRuns = runsDto }; return(allRunsViewModel); }
public ActionResult Index() { var model = db.GetAll(); return(View(model)); }