-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
WIP: Entity Framework #500
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #500 +/- ##
==========================================
- Coverage 75.94% 75.05% -0.9%
==========================================
Files 269 271 +2
Lines 6794 7008 +214
Branches 570 596 +26
==========================================
+ Hits 5160 5260 +100
- Misses 1385 1489 +104
- Partials 249 259 +10
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need some help here
|
||
namespace EventFlow.EntityFramework.Extensions | ||
{ | ||
public static class Bulk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not proud of this one. Please help. See comment for further information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no way to delete entities without querying them first: https://www.google.de/search?q=ef+core+"delete+where"
There seems to be a package that supports batch delete, but 1.) that's lots of code, 2.) it needs a reference to Microsoft.EntityFrameworkCore.Relational
(that we don't need otherwise) - and 3.) obviously it needs to hardcode SQL commands for the major providers. Which means it only works for those, probably: https://github.com/zzzprojects/EntityFramework-Plus/blob/master/src/shared/Z.EF.Plus.BatchDelete.Shared/BatchDelete.cs
This affects both Read Stores and Snapshot Stores.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, no help here, haven't worked with EF in almost five years. Pretty sure I'm outdated (we use Dapper for almost everything)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This topic seems to continue discussing in long time. (dotnet/efcore#6567)
Something like a Delete
extension method might not be implemented for the time being in EF side.
To resolve 3.) concern, take on 1.) and 2.)
This PoC is idubnori#4
Implemented in #514 |
Todo
Nice to have
byte[]
Version/TimestampSee also #260