Beispiel #1
0
        public ActionResult Create(Suppliers suppliers)
        {
            if (ModelState.IsValid)
            {
                db.Suppliers.Add(suppliers);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

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