Skip to content

This PR addresses issue #1573 by modifying the GetDeserializer logic to map nullable decimal values to 0m instead of null.#2167

Open
AlexGreatDev wants to merge 1 commit intoDapperLib:mainfrom
AlexGreatDev:fix/nullable-decimal-1573
Open

This PR addresses issue #1573 by modifying the GetDeserializer logic to map nullable decimal values to 0m instead of null.#2167
AlexGreatDev wants to merge 1 commit intoDapperLib:mainfrom
AlexGreatDev:fix/nullable-decimal-1573

Conversation

@AlexGreatDev
Copy link

  • Added explicit check for decimal? types in GetDeserializer
  • Returns 0m when encountering a NULL value
  • Maintains existing behavior for other types

Closes #1573

@mgravell
Copy link
Member

Returning zero for null seems ... just wrong; unless I'm mistaken (and that does happen), we don't usually null-coalesce like this; what is the reason / scenario here?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Just wonder reason of the casting?

2 participants