Пример #1
0
        private bool TryScript(ScripterInput input, out string result)
        {
            result = null;

            bool success = false;

            try
            {
                using (IDbConnection connection = _hostCtx.CloneCurrentConnection(input.Database))
                {
                    connection.Open();
                    result  = _scripter.Script(connection, input);
                    success = true;
                }
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }

            return(success);
        }