Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ExistingTable existingTable = db.ExistingTables.Find(id);

            db.ExistingTables.Remove(existingTable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,Data")] ExistingTable existingTable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(existingTable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(existingTable));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "Id,Data")] ExistingTable existingTable)
        {
            if (ModelState.IsValid)
            {
                db.ExistingTables.Add(existingTable);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(existingTable));
        }
Beispiel #4
0
        // GET: ExistingTables/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ExistingTable existingTable = db.ExistingTables.Find(id);

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