Пример #1
0
        public ActionResult Create(KemtahTech kemtahtech)
        {
            if (ModelState.IsValid)
            {
                db.KemtahTeches.Add(kemtahtech);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(kemtahtech);
        }
Пример #2
0
 public ActionResult Edit(KemtahTech kemtahtech)
 {
     if (ModelState.IsValid)
     {
         db.Entry(kemtahtech).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(kemtahtech);
 }