C#C
C#3y ago
moritz

Dapper enum to snake_case string

Hi, I have an enum ItemType with values like FileCollection. In the database a string is stored in snake_case form, eg. 'file_collection'.
Dapper doesn't seem to map it automatically, even with DefaultTypeMap.MatchNamesWithUnderscores = true;.
Anyone else had a problem like this before and can help?
Was this page helpful?