示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Season1 season1 = db.Seasons1.Find(id);

            db.Seasons1.Remove(season1);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "SeasonID,Season")] Season1 season1)
 {
     if (ModelState.IsValid)
     {
         db.Entry(season1).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(season1));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "SeasonID,Season")] Season1 season1)
        {
            if (ModelState.IsValid)
            {
                db.Seasons1.Add(season1);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(season1));
        }
示例#4
0
        // GET: Season1/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Season1 season1 = db.Seasons1.Find(id);

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