public ActionResult Delete(int id)
        {
            var model = _db.GetSubcategory(id);

            if (model != null)
            {
                return(View("Delete", model));
            }
            return(HttpNotFound());
        }
예제 #2
0
        public ActionResult GetAllItemsForSubcategory(int subcategoryId)
        {
            if (Request.IsAjaxRequest())
            {
                var model = _db.GetSubcategory(subcategoryId).Items;
                return(PartialView("_Items", model));
            }

            return(HttpNotFound());
        }