public ActionResult Create(LOG log) { if (ModelState.IsValid) { db.LOG.Add(log); db.SaveChanges(); return RedirectToAction("Index"); } return View(log); }
public ActionResult Edit(LOG log) { if (ModelState.IsValid) { db.Entry(log).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(log); }