예제 #1
0
        public async Task OnGet(CatalogIndexViewModel catalogModel, int?pageId, int?deleteId)
        {
            CatalogModel = await _catalogViewModelService.GetCatalogItems(pageId ?? 0, Constants.ITEMS_PER_PAGE, catalogModel.BrandFilterApplied, catalogModel.TypesFilterApplied);

            if (deleteId != null)
            {
                await _catalogViewModelService.DeleteCatalogItem(catalogModel.CatalogItems.Where(x => x.Id == deleteId).SingleOrDefault());
            }
        }