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

Does this support DateOnly/TimeOnly? #142

Closed
VictorioBerra opened this issue Mar 13, 2024 · 6 comments
Closed

Does this support DateOnly/TimeOnly? #142

VictorioBerra opened this issue Mar 13, 2024 · 6 comments
Assignees

Comments

@VictorioBerra
Copy link

A recent PR to Dapper added support for DateOnly/TimeOnly. Is creating a date field in Microsoft SQL Server + DateOnly in C# supported by zzzprojects Dapper-Plus?

@JonathanMagnan JonathanMagnan self-assigned this Mar 14, 2024
@JonathanMagnan
Copy link
Member

Hello @VictorioBerra ,

That's a good question; I know we already support it for our Entity Framework Extensions library, but I'm not sure for Dapper Plus. I will ask my developer to look at it.

Best Regards,

Jon

@JonathanMagnan
Copy link
Member

Hello @VictorioBerra ,

Just to let you know that DateOnly and TimeOnly will be supported the next time we release Dapper Plus (normally on Tuesday 26)

Best Regards,

Jon

@VictorioBerra
Copy link
Author

That is exciting, thank you! So we can create a MSSQL date col and a DateOnly C# prop and it will all magically work?

@JonathanMagnan
Copy link
Member

Yup, as soon as the new version is released.

I didn't test it but my employee told me it could already work with the current version by adding both type this way:

DapperPlusManager.AddCustomSupportedType(typeof(DateOnly));
DapperPlusManager.AddCustomSupportedType(typeof(TimeOnly));

Best Regards,

Jon

@JonathanMagnan
Copy link
Member

Hello @VictorioBerra ,

The support to DateOnly and TimeOnly has been added in the version 7.4.0.

Could you test it and let us know if everything is working as expected?

Best Regards,

Jon

@VictorioBerra
Copy link
Author

Thank you @JonathanMagnan sorry for the delay, it worked great!

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

No branches or pull requests

2 participants