79228381

Date: 2024-11-26 21:57:18
Score: 1.5
Natty:
Report link

Ran into this while using the latest version of Dapper as of this writing. Although some have made custom handlers, such as can be found here: https://github.com/DapperLib/Dapper/issues/1715 , I found that the Quickest/Easiest solution for me was to just have my Dates set as DateTime types in my C# model, but have the table column types in SQL Server be just Date types. This truncates the time off as it is stored in the database, and proved a nice solution for now (until support for DateOnly gets better).

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Joel Youngberg