public ActionResult Edit(Report report) { if (ModelState.IsValid) { context.Entry(report).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(report); }
public ActionResult Create(Report report) { if (ModelState.IsValid) { db.Reports.Add(report); db.SaveChanges(); return RedirectToAction("Index"); } return View(report); }
public ActionResult Create(string rawSql = "") { if (!String.IsNullOrEmpty(rawSql)) { Report report = new Report(); report.Query = rawSql; return View(report); } return View(); }