コード例 #1
0
        public PaychecksViewModel CreateModelForPaycheckIndex()
        {
            var paychecks = _itemFetcherService.GetPaychecks(10);

            PaychecksViewModel model = new PaychecksViewModel()
            {
                Paychecks     = paychecks,
                AllTimeEarned = _user.AllTimeEarned
            };

            return(model);
        }
コード例 #2
0
 // Index = GetAllPaychecks
 public IActionResult Index()
 {
     try
     {
         PaychecksViewModel model = _vmGenerator.CreateModelForPaycheckIndex();
         return(View(model));
     }
     catch
     {
         return(BadRequest());
     }
 }