SQLCMD mode SQL script execution library
C#
Failed to load latest commit information.
Properties
.gitignore
Environment.cs removed 'trunk', changed .csproj and .nuspec, removed .sln Mar 29, 2016
README.md
SqlCmd.cs removed 'trunk', changed .csproj and .nuspec, removed .sln Mar 29, 2016
SqlCmdEventArgs.cs
SqlCmdException.cs
com.rusanu.dbutil.csproj
com.rusanu.dbutil.nuspec

README.md

DbUtilSqlCmd

SQLCMD mode SQL script execution library. Allows your .Net application to run .sql files against SQL Server. Handles the batch delimiters (GO) and SQLCMD mode commands like :setvar or :connect.

C# Static Method Example

using com.rusanu.DBUtil;

SqlCmd.ExecuteFile(SqlConnection, @"The\Path\To\Your\Sp.sql");

C# Instance Method Example

using com.rusanu.DBUtil;

var inst = new SqlCmd(SqlConnection)
inst.ExecuteFile(@"The\Path\To\Your\Sp.sql");

NuGet

Available on NuGet.org as com.rusanu.DBUtil