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

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