79550290

Date: 2025-04-02 09:52:14
Score: 3.5
Natty:
Report link

I have the following challenge. Im using dapper to access 2 databases in the same codebase.

Database 1: Uses UTC dates (i could change this but would not like to do that)
Database 2: Uses LocalDates (not something i can change)

These typehandlers are static, what means not repository/connectionstring specific

SqlMapper.AddTypeHandler(new DateTimeUtcHelper());

Any idea's how to solve this problem?

(Could implement datetimeoffset in Database 1 so the datatype is different)

Reasons:
  • Blacklisted phrase (1): how to solve
  • RegEx Blacklisted phrase (1.5): how to solve this problem?
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: user30141463