public ActionResult DeleteConfirmed(int id) { AspNetCatalog aspNetCatalog = db.AspNetCatalogs.Find(id); db.AspNetCatalogs.Remove(aspNetCatalog); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,CatalogName")] AspNetCatalog aspNetCatalog) { if (ModelState.IsValid) { db.Entry(aspNetCatalog).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aspNetCatalog)); }
public ActionResult Create([Bind(Include = "Id,CatalogName")] AspNetCatalog aspNetCatalog) { if (ModelState.IsValid) { db.AspNetCatalogs.Add(aspNetCatalog); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aspNetCatalog)); }
// GET: AspNetCatalog/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AspNetCatalog aspNetCatalog = db.AspNetCatalogs.Find(id); if (aspNetCatalog == null) { return(HttpNotFound()); } return(View(aspNetCatalog)); }