Example #1
0
        public ActionResult Create(Pool pool)
        {
            if (ModelState.IsValid)
            {
                db.PoolSet.Add(pool);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(pool);
        }
Example #2
0
 public ActionResult Edit(Pool pool)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pool).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(pool);
 }