Example #1
0
 public void OnGet()
 {
     List       = PartService.GetAll(CategoryID);
     Categories = PartCategoryService.GetAll().Select(a => new SelectListItem
     {
         Value    = a.CategoryID.ToString(),
         Text     = a.Title,
         Selected = CategoryID == a.CategoryID
     });
 }
Example #2
0
        public ActionResult Blocks()
        {
            IEnumerable <Category> categories = categoryRepository.Query();

            SearchBlockModel model = new SearchBlockModel();

            model.AllCategories = categories;
            model.Action        = "Blocks";
            model.Controller    = "Search";

            var blocks = blockService.GetAll(20);

            ViewBag.listItems = blocks.ToList();

            return(View(model));
        }
Example #3
0
 public async Task <IActionResult> GetAll()
 {
     return(Ok(partService.GetAll()));
 }
        public List <PartApi> GetAll(int take = -1, int offset = 0)
        {
            var kockice = kockicaService.GetAll(take, offset).ToList();

            return(Mapper.Map <List <PartApi> >(kockice));
        }