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