-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"No mapping exists" error when using a TypeHandler and a collection parameter #2067
Comments
tlecomte
pushed a commit
to tlecomte/Dapper
that referenced
this issue
Apr 3, 2024
…ameter Fixes DapperLib#2067 The code for `SqlMapper.PackListParameters` was not using the custom type handler. This caused an error like `No mapping exists from object type xxxxx to a known managed provider native type.` when passing a collection parameter to a query, when the type of the collection items is not natively supported by the SQL client, and when a custom `TypeHandler` is registered for it. Here this is fixed by using the same logic that is already in `DynamicParameters.AddParameter`. A unit test is added to cover the scenario.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dapper is throwing an error when running a query in the following scenario:
Example:
The text was updated successfully, but these errors were encountered: