Skip to content

I used this with Dapper to convert DataTables to SQL strings

License

Notifications You must be signed in to change notification settings

mrjamiebowman/Dapper-Debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dapper Debug

I created this to help debug and test stored procedures in Dapper. I used this with Dapper to convert DataTables to SQL Table Type string statements.

TODO: Docker Compose with MSSQL Server and sample database. TODO: Setup sample project. TODO: Add more debugging functionality.

Convert Table Types to SQL

If you are using stored procedures with custom table types. This is extreamly useful for intercepting the data that is being sent to the stored procedure.

/* for testing */
if (debug == true) {
    string tableTypeSql = DapperDebug.GetTableTypeSql(dataTable, "@TblTypeObj");
    System.Diagnostics.Debug.WriteLine($"-- Stored Procedure: uspStoredProcedure");
    System.Diagnostics.Debug.WriteLine($"{tableTypeSql}");
}

About

I used this with Dapper to convert DataTables to SQL strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published