Example #1
0
        private static async Task TestServices()
        {
            var props = new ConnectionProperties {
                Server              = @"localhost\SQLEXPRESS",
                Login               = "******",
                Password            = "******",
                IsPasswordEncrypted = false
            };

            var conPropsService = new ConnectionPropertiesService(null, new CryptoManager());
            var scriptService   = new ScriptService(conPropsService, null);
            var executor        = scriptService.GetScriptExecutor(props);
            var script          = new Script {
                Body = "select * from sys.databases"
            };
            var result = await executor.ExecuteScriptMultiple(script.Body);

            PrintScriptMultipleResult(result);
        }