-
Notifications
You must be signed in to change notification settings - Fork 127
Closed
Labels
breaking-changesA breaking changes (issue, request, enhancement, etc)A breaking changes (issue, request, enhancement, etc)enhancementNew feature or requestNew feature or requestfixedThe bug, issue, incident has been fixed.The bug, issue, incident has been fixed.todoThings to be done in the futureThings to be done in the future
Description
Describe the enhancement
As a support the enhancement #1052, it would be great if we can pass the actual IDbDataParameter as a direct value to the target property/columns, so the users have the freedom of all the attributes they would like to pass.
using (var connection = new SqlConnection("..."))
{
var people = connection.ExecuteQuery<Person>("SELECT * FROM [Person] WHERE (FirstName = @FirstName);",
new { FirstName = new SqlParameter("_", DbType.String) { Value = "John", SqlDbType = SqlDbType.Text });
}
And below is when querying via fluent methods with QueryField object.
using (var connection = new SqlConnection("..."))
{
var people = connection.Query<Person>(new QueryField("Name",
new { FirstName = new SqlParameter("_", DbType.String) { Value = "John", SqlDbType = SqlDbType.Text });
}
Note: The value of the name passed in the IDbDataParameter object ('_') is not necessary due to the anonymous/QueryField object has a targeted property duing the assignment. Therefore, by default, whatever values passed to this property will be changed prior to the execution.
Additional Context
By having this capability, it will supercede all the configuration and mappings defined for the affected property/column of the entity/table.
rafek1241
Metadata
Metadata
Assignees
Labels
breaking-changesA breaking changes (issue, request, enhancement, etc)A breaking changes (issue, request, enhancement, etc)enhancementNew feature or requestNew feature or requestfixedThe bug, issue, incident has been fixed.The bug, issue, incident has been fixed.todoThings to be done in the futureThings to be done in the future