Пример #1
0
        public IActionResult OurStuff()
        {
            var model = new StuffViewModel();

            model.People = _person.GetAllPeople();

            return(View(model));
        }
Пример #2
0
        public async Task <ActionResult> Stuff()
        {
            var pagedResults = await _proxy.Get <PagedResults <Stuff> >("/stuff/get?pagesize=12");

            var colours = await _proxy.Get <PagedResults <Colour> >("/colour/get?pagesize=0");

            var categories = await _proxy.Get <PagedResults <Category> >("/category/get?pagesize=0");

            var model = new StuffViewModel();

            model.PagedResults = pagedResults;
            model.Colours      = colours.Results;
            model.Categories   = categories.Results;

            return(View("stuff", null, JsonConvert.SerializeObject(model)));
        }