Example #1
0
        public ActionResult DeleteCategoryProperty(int id)
        {
            using (ShopStorage context = new ShopStorage())
            {
                CategoryProperties categoryProperty = context.CategoryProperties.Select(c => c).Where(c => c.Id == id).First();
                context.DeleteObject(categoryProperty);
                context.SaveChanges();
            }

            return RedirectToAction("CategoryProperties");
        }