示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SchemaViews schemaViews = db.SchemaViews.Find(id);

            db.SchemaViews.Remove(schemaViews);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 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));
 }
示例#3
0
        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));
        }
示例#4
0
        // 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));
        }