Ejemplo n.º 1
0
        public CategoryItemProdViewModel GetCategoryInfo(int id)
        {
            CategoryItemProdViewModel model = null;
            var category = _categoryRepository.GetCategoryById(id);

            if (category != null)
            {
                model = new CategoryItemProdViewModel
                {
                    Id        = category.Id,
                    Name      = category.Name,
                    Published = category.Published
                };
            }
            return(model);
        }
Ejemplo n.º 2
0
 public ActionResult Delete(CategoryItemProdViewModel categoryDel)
 {
     _productProvider.Delete(categoryDel.Id);
     return(RedirectToAction("Index"));
 }