Пример #1
0
        public ActionResult CategoryDelete(int id)
        {
            category.Remove(id);
            var Category = category.Get_All().Select
                           (
                item => new CategoriesItemViewModel
            {
                Id          = item.Id,
                Discription = item.Discription,
                Name        = item.Name
            }
                           ).ToList();

            return(PartialView("Category", Category));
        }
Пример #2
0
 public ActionResult Delete(CategoriesItemViewModel item)
 {
     _context.Remove(item.Id);
     return(RedirectToAction("Index"));
 }