© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
2 replies
moritz

Dapper enum to snake_case string

Hi, I have an enum
ItemType
ItemType
with values like
FileCollection
FileCollection
. In the database a string is stored in snake_case form, eg.
'file_collection'
'file_collection'
.
Dapper doesn't seem to map it automatically, even with
DefaultTypeMap.MatchNamesWithUnderscores = true;
DefaultTypeMap.MatchNamesWithUnderscores = true;
.
Anyone else had a problem like this before and can help?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Convert Enum to string
C#CC# / help
4y ago
Binding case-insensitive query parameter to string enum in .NET 9 Minimal API
C#CC# / help
13mo ago
Enum vs string const class
C#CC# / help
4y ago