-
-
Notifications
You must be signed in to change notification settings - Fork 999
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
Change the implement of the compare operator of DateTime #1895
Change the implement of the compare operator of DateTime #1895
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1895 +/- ##
==========================================
+ Coverage 25.51% 27.39% +1.88%
==========================================
Files 488 511 +23
Lines 32187 24538 -7649
Branches 0 238 +238
==========================================
- Hits 8212 6723 -1489
+ Misses 23975 17779 -6196
- Partials 0 36 +36
Continue to review full report at Codecov.
|
AddMilliseconds method can be translated by ef core, you can use this. |
I've tried, but it can't be translated by I am not sure if we should be compatible with it |
I have tried sql server and sqlite provider and this works. It's not a good news that 'Pomelo.EntityFrameworkCore.MySql' doesn't support this translation. Can you share your usage of 'AddMilliseconds'? And there are multiple mysql providers. Maybe you can also have a try with 'MySql.EntityFrameworkCore' |
My usage is s = _db.s.Where(x => x.DateTime.AddMilliseconds(-x.DateTime.Millisecond) == DateTime.Now) and the error is
|
8ea9455
to
08c929d
Compare
Since PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#1497 is merged, the new implement won't cause error with Pomelo.EntityFrameworkCore.MySql |
Nevertheless, we need to be compatible with the older version. |
现在 Pomelo.EntityFrameworkCore.MySql 那边属于是合并了但是没发版吧,我觉得只要那边发版了就行,兼容旧版本只能说尽量吧,但是现在不排除其他数据库/orm还有兼容问题。 |
cf15ee2
to
da1f573
Compare
Co-authored-by: James Yeung <shunjiey@hotmail.com>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
🤔 This is a ...
🔗 Related issue link
close #1894
💡 Background and solution
The way of remove millisecond in #1864 is not supported by
Pomelo.EntityFrameworkCore.MySql
(maybe even more third party orm libraries), so I changed the implement of compare operator.📝 Changelog
☑️ Self Check before Merge