cmeeren / Facil

Facil generates F# data access source code from SQL queries and stored procedures. Optimized for developer happiness.
MIT License
140 stars 7 forks source link

Support DateOnly type. #52

Open GepHub opened 1 year ago

GepHub commented 1 year ago

Today when we use SQL "Date" type, facil generates DateTime type parameter. With NET6, now we can use DateOnly type.

I didn't find if that type can be overwritten on yaml settings.

cmeeren commented 1 year ago

Correct, it is not supported at the moment.

Since Facil targets .NET 6 and above, mapping DATE to DateOnly makes sense.

However, I am currently swamped both at work and at home, and converting from DateTime to DateOnly in user code is trivial, so I'm not sure I will get to this any time soon. I'll leave the issue open, however.

I also think it's better to make this a breaking change and only support DateOnly for DATE types, both because that mapping makes perfect sense, and because adding additional config values adds complexity.