public ActionResult Edit(Receipt r) { if (ModelState.IsValid) { db.Entry(r).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(r); }
public ActionResult Create(Receipt receipt) { if (ModelState.IsValid) { return View(receipt); //context.Add(receipt); //return RedirectToAction("Details", new { id = receipt.id }); } return View(receipt); }