public PaychecksViewModel CreateModelForPaycheckIndex() { var paychecks = _itemFetcherService.GetPaychecks(10); PaychecksViewModel model = new PaychecksViewModel() { Paychecks = paychecks, AllTimeEarned = _user.AllTimeEarned }; return(model); }
// Index = GetAllPaychecks public IActionResult Index() { try { PaychecksViewModel model = _vmGenerator.CreateModelForPaycheckIndex(); return(View(model)); } catch { return(BadRequest()); } }