public SQLQueryResult Execute(string webAppId, [FromBody] SQLExecuteConfig config) { try { WebApp webApp = WebAppManager.GetById(webAppId); string connectionStr = webApp.DBConnectionString; return(ExecuteSQL(connectionStr, config.Sql)); } catch (Exception ex) { return(new SQLQueryResult { Success = false, Sql = config.Sql, ErrorMessage = ex.Message, ErrorStack = ex.StackTrace }); } }
public BaseController(WebAppManager webAppManager) { WebAppManager = webAppManager; }
/// <summary> Create instance of <see cref="ApplicationPoolController"/> </summary> /// <param name="webAppManager">менеджер</param> public ApplicationPoolController(WebAppManager webAppManager) : base(webAppManager) { }
public DBController(WebAppManager webAppManager) : base(webAppManager) { }
/// <summary> Отримати клієнт для підключення до бази redis застосунку </summary> /// <param name="id">id застосунку</param> /// <returns>клієнт</returns> protected IRedisClient GetWebAppRedisClient(string id) { WebApp webApp = WebAppManager.GetById(id); return(CreateRedisClient(webApp.RedisConnectionString)); }
public RedisController(WebAppManager webAppManager) : base(webAppManager) { }
public List <WebApp> Get(bool updateInCache = false) { return(WebAppManager.GetWebApps(updateInCache)); }