コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Bisarchista bisarchista = db.Bisarchista.Find(id);

            db.Bisarchista.Remove(bisarchista);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "ID,Descr")] Bisarchista bisarchista)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bisarchista).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bisarchista));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "ID,Descr")] Bisarchista bisarchista)
        {
            if (ModelState.IsValid)
            {
                db.Bisarchista.Add(bisarchista);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bisarchista));
        }
コード例 #4
0
        // GET: Bisarchistas/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Bisarchista bisarchista = db.Bisarchista.Find(id);

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