예제 #1
0
        public ActionResult WriterUpdate(TblWriter p)
        {
            var writer = db.TblWriter.Find(p.ID);

            writer.Name    = p.Name;
            writer.Surname = p.Surname;
            writer.Detail  = p.Detail;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult WriterAdd(TblWriter p)
 {
     db.TblWriter.Add(p);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }