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")); }
public ActionResult WriterAdd(TblWriter p) { db.TblWriter.Add(p); db.SaveChanges(); return(RedirectToAction("Index")); }