Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tableB tableB = db.tableBs.Find(id);

            db.tableBs.Remove(tableB);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "id,name")] tableB tableB)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tableB).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tableB));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "id,name")] tableB tableB)
        {
            if (ModelState.IsValid)
            {
                db.tableBs.Add(tableB);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tableB));
        }
Esempio n. 4
0
        // GET: tableBs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tableB tableB = db.tableBs.Find(id);

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