Exemplo n.º 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
     });
 }
Exemplo n.º 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));
        }
Exemplo n.º 3
0
 public async Task <IActionResult> GetAll()
 {
     return(Ok(partService.GetAll()));
 }
Exemplo n.º 4
0
        public List <PartApi> GetAll(int take = -1, int offset = 0)
        {
            var kockice = kockicaService.GetAll(take, offset).ToList();

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