Skip to content

Enhancement: Consider supporting the execution of the TVP in SQL Server. #566

@mikependon

Description

@mikependon

This user story will enable the library to execute a statement that can pass a TVP (or DataTable object) in the execution. By default, if the value of the property of the passed parameter is DataTable, then the SqlParameter.TypeName must be automatically set based on the value of the DataTable.TableName.

// Setup
var table = CreateIdentityTableType();

using (var connection = new SqlConnection(Database.ConnectionStringForRepoDb))
{
	// Act
	var executeResult = connection.ExecuteQuery<IdentityTable>("sp_identity_table_type",
		new { Table = table }).First();

	// Act
	var queryResult = connection.QueryAll("SELECT * FROM [sc].[IdentityTable];").First();

	// Assert
	Helper.AssertPropertiesEquality(executeResult, queryResult);
}

Metadata

Metadata

Assignees

Labels

deployedFeature or bug is deployed at the current releaseenhancementNew feature or requestfixedThe bug, issue, incident has been fixed.todoThings to be done in the future

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions