Example #1
0
            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);
            }
Example #2
0
        public ActionResult Index()
        {
            var model = db.GetAll();

            return(View(model));
        }