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