Exemplo n.º 1
0
        public ActionResult Edit(Blog blog)
        {
            if(ModelState.IsValid)
            {
                db.Entry(blog).State = EntityState.Modified;
                db.SaveChanges();
                ViewBag.CurrentTime = String.Format("{0:yyyy-MM-dd}", DateTime.Now);

                return RedirectToAction("Index");
            }
            return View(blog);
        }
Exemplo n.º 2
0
 public ActionResult Edit(Journal journal)
 {
     _db.Entry(journal).State = System.Data.Entity.EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }