Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DateOnly type. #52

Open
GepHub opened this issue Feb 17, 2023 · 1 comment
Open

Support DateOnly type. #52

GepHub opened this issue Feb 17, 2023 · 1 comment

Comments

@GepHub
Copy link

GepHub commented Feb 17, 2023

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
Copy link
Owner

cmeeren commented Feb 17, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants