Skip to content

SetValue is not invoked in a Dapper custom TypeHandler #607

Description

@oS-So

As per THIS question:

Given:

publicclassGuidHandler:SqlMapper.TypeHandler<Guid>{publicoverridevoidSetValue(IDbDataParameterparameter,Guidvalue){// My Custom logic}publicoverrideGuidParse(objectvalue){returnGuid.Parse(value.ToString());}}
...SqlMapper.AddTypeHandler(newGuidHandler());

Even though the Parse is correctly invoked when reading from the DB, the SetValue however never gets called when writing the data.

Any idea of what is going on?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changev3.0Changes awaiting the next breaking release

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions