예제 #1
0
        public ActionResult Create(LOG log)
        {
            if (ModelState.IsValid)
            {
                db.LOG.Add(log);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(log);
        }
예제 #2
0
 public ActionResult Edit(LOG log)
 {
     if (ModelState.IsValid)
     {
         db.Entry(log).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(log);
 }