© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4mo ago•
8 replies
AlisterKB

postgresql, efcore, fluent api mappings

Just started playing around with posgress and efcore. The type mapping for fluent api is different from sql server. The reference for mappings I believe is here: https://www.npgsql.org/doc/types/basic.html#write-mappings
My main question is, when I'm writing
 .HasColumnType("")
 .HasColumnType("")
should follow the values in the column "PostgreSQL type"? or is "NpgsqlDbType" is valid too?
meaning for nvarchar =>
 .HasColumnType("character varying")
 .HasColumnType("character varying")
or
 .HasColumnType("Varchar")
 .HasColumnType("Varchar")
Screenshot_2025-10-19_233640.png
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

❔ Hello, Fluent Api
C#CC# / help
4y ago
✅ Fluent API Relationship Help
C#CC# / help
3y ago
❔ fluent api naming/design
C#CC# / help
3y ago
❔ Entity framework core Fluent API
C#CC# / help
3y ago