public ActionResult Create(Sharj model) { model.SubmitDate = DateTime.Now; db.Sharjs.Add(model); db.SaveChanges(); return(RedirectToAction("index")); }
public ActionResult Edit(Sharj model) { db.Entry(model).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }