Exemplo n.º 1
0
        public WantsViewModel CreateNeededModelForWantsIndex()
        {
            var wants = _itemFetcherService.GetWants(10);

            WantsViewModel model = new WantsViewModel()
            {
                Wants            = wants,
                BudgetedForWants = _user.BudgetedForWants
            };

            return(model);
        }
Exemplo n.º 2
0
 public IActionResult Index()
 {
     try
     {
         WantsViewModel model = _vmGenerator.CreateNeededModelForWantsIndex();
         return(View(model));
     }
     catch
     {
         return(BadRequest());
     }
 }