Let's say I have a user defined data type in the database:
MySuperType which as two bigint properties in it (Id + Code)
And I have a stored procedure which takes in those parameters:
@MySuperType, @Price, @dateModified, etc...
Now in my code, I am using Dapper like this:
using (var connecion = new SqlConnection(_connectionString))
{
result = connection.Execute("SP_name",
new {mySuperType, price, date},
commandType: CommandType.StoredProcedure);
}
But I keep getting an error
Type Operand clash: Dapper is not able to map the user defined type: MySuperType from the parameters to the stored procedure.
Changing the stored procedure or replacing the user-defined type isn't an option
Does anyone have an idea what I can do to map the types and send the parameters (all of them) to the stored procedure?