public ActionResult Edit(Reclamacao reclamacao) { if (ModelState.IsValid) { db.Entry(reclamacao).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(reclamacao); }
public ActionResult Create(Reclamacao reclamacao) { if (ModelState.IsValid) { reclamacao.DataInsercao = DateTime.Now; db.Reclamacaos.Add(reclamacao); db.SaveChanges(); return RedirectToAction("Index"); } return View(reclamacao); }