コード例 #1
0
 public ActionResult Edit(CommissioningRequirements commissioningrequirements)
 {
     if (ModelState.IsValid)
     {
         db.Entry(commissioningrequirements).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(commissioningrequirements);
 }
コード例 #2
0
        public ActionResult Create(CommissioningRequirements commissioningrequirements)
        {
            if (ModelState.IsValid)
            {
                db.CommissioningRequirements.Add(commissioningrequirements);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(commissioningrequirements);
        }