Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            var     catalogManager = new CatalogManager();
            Catalog catalog        = catalogManager.GetCatalogById(id);

            catalogManager.DeleteAndSave(catalog);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var     catalogManager = new CatalogManager();
            Catalog catalog        = catalogManager.GetCatalogById(id);

            if (catalog == null)
            {
                return(HttpNotFound());
            }
            return(View(catalog));
        }