IUserType converting NodaTime.Duration etc to pg Interval

10 views
Skip to first unread message

Michael W Powell

unread,
Jun 2, 2025, 3:04:14 PMJun 2
to nhusers
Hello,

How do we represent Interval at a language level in order for IUserType to correctly map to NodaTime.Duration?

Note, I do not have a lot of flexibility there, the mapping MUST bridge between NodaTime.Duration and pg database INTERVAL, no ifs ands or buts. The database is established, as is the domain model, for the most part, in this aspect.

Is it possible with NH? IUserType? I know for instance there is ia pg adapter out there for EF core, for example, but what I do not know is the same sort of isms translate for NH purposes.

Thank you, best,

Michael W. Powell
Reply all
Reply to author
Forward
0 new messages