public ActionResult Index() { var executor = new SQLExecutor(); var model = new SQLResult { ConnectionString = _sqlCommandServices.GetConnectionString(), Histories = _sqlCommandServices.GetHistories(), ReadOnly = true, Tables = executor.GetTableNames() }; return View(model); }
public ActionResult Index(SQLRequest request, bool exportToFile = false) { var executor = new SQLExecutor(); var result = executor.Execute(request); if (exportToFile) { return new FileContentResult(Encoding.UTF8.GetBytes(result.ToString()), "text/plain") { FileDownloadName = "QueryResult.txt" }; } return View(result); }
public JsonResult GenerateUpdateStatement(string tablename) { var executor = new SQLExecutor(); return Json(executor.GenerateUpdateCommand(tablename)); }