EntityFramework-Plus icon indicating copy to clipboard operation
EntityFramework-Plus copied to clipboard

When querying table TemporalTableBetween sql throws error non convertible datetime

Open Ilkhom-S opened this issue 2 years ago • 10 comments

When use TemporalTableBetween extension. Datetimes can't converted to datetime2 in sql

Exception:

Microsoft.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting date and/or time from character string.

Ilkhom-S avatar May 30 '23 12:05 Ilkhom-S

Hello @Ilkhom-S ,

Thank you for contacting us, we will look at it.

Best Regards,

Jon


Sponsorship Help us improve this library

Performance Libraries context.BulkInsert(list, options => options.BatchSize = 1000); Entity Framework ExtensionsDapper Plus

Runtime Evaluation Eval.Execute("x + y", new {x = 1, y = 2}); // return 3 C# Eval Function

JonathanMagnan avatar May 30 '23 13:05 JonathanMagnan

@JonathanMagnan , I found that only when current context culture is other than en-us exception thrown. I tested with ru-RU , it's giving error on en-US its ok.

Ilkhom-S avatar May 30 '23 13:05 Ilkhom-S

Hello @Ilkhom-S ,

Do you think you could create a runnable project with the issue? It doesn’t need to be your project, just a new solution with the minimum code to reproduce the issue.

My developer told me that it worked when he did the culture test, so perharp we are missing something to reproduce it.

Best Regards,

Jon

JonathanMagnan avatar May 31 '23 00:05 JonathanMagnan

Hello, I create sample project to demonstrate problem. You need to apply migration and run console app to see problem

https://github.com/Ilkhom-S/ZZZThreadBug

Ilkhom-S avatar May 31 '23 04:05 Ilkhom-S

I commented block where querying with ZZZ extension with default culture, because duplicate hook error was throwing.

Ilkhom-S avatar May 31 '23 04:05 Ilkhom-S

Hello @Ilkhom-S ,

It's possible that the GitHub repos is private? We currently receive a Page not found when trying to go in your repository: https://github.com/Ilkhom-S/ZZZThreadBug

If you need to keep the code private, you can send it here: [email protected]

Best Regards,

Jon

JonathanMagnan avatar Jun 01 '23 16:06 JonathanMagnan

Apologize. I make it public

Ilkhom-S avatar Jun 01 '23 16:06 Ilkhom-S

Hello @Ilkhom-S ,

Just to let you know that the issue has been fixed and should be released next week.

Best Regards,

Jon

JonathanMagnan avatar Jun 06 '23 20:06 JonathanMagnan

Thanks,

Ilkhom-S avatar Jun 07 '23 03:06 Ilkhom-S

Hello @Ilkhom-S ,

A new version has been released yesterday that should fix this issue.

If you have the chance to test it, let us know if everything has been fixed correctly.

Best Regards,

Jon


Are you finding this library useful? If so, please consider supporting its continued development by becoming a sponsor.

Additionally, if you think your enterprise would benefit from this library, we encourage you to suggest they become a sponsor as well. Your support will help ensure this library remains alive and well-supported.

JonathanMagnan avatar Jun 13 '23 13:06 JonathanMagnan