Skip to content
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

fix(TypeHandler): use the custom type handler when packing a list parameter #2068

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Apr 3, 2024

  1. fix(TypeHandler): use the custom type handler when packing a list par…

    …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.
    Timothée Lecomte committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    da6a2ef View commit details
    Browse the repository at this point in the history