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.
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.
And below is when querying via fluent methods with QueryField object.
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.