-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
v1: Convert Entity Framework #1076
Conversation
18911ca
to
828226a
Compare
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.
Source/EventFlow.EntityFramework.Tests/MsSql/EfMsSqlReadStoreIncludeTests.cs
Outdated
Show resolved
Hide resolved
Source/EventFlow.EntityFramework.Tests/MsSql/EfMsSqlReadStoreTests.cs
Outdated
Show resolved
Hide resolved
Source/EventFlow.EntityFramework.Tests/MsSql/EfMsSqlSnapshotTests.cs
Outdated
Show resolved
Hide resolved
Source/EventFlow.EntityFramework.Tests/MsSql/EfMsSqlEventStoreTests.cs
Outdated
Show resolved
Hide resolved
Source/EventFlow.EntityFramework.Tests/PostgreSql/EfPostgreSqlReadStoreTests.cs
Outdated
Show resolved
Hide resolved
Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj
Outdated
Show resolved
Hide resolved
Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj
Outdated
Show resolved
Hide resolved
Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj
Outdated
Show resolved
Hide resolved
0eb25db
to
e099ecd
Compare
While I'm usually not pedantic regarding squash/rebase and prefer to use merge commits to show the history. Maybe I can get you to squash this PR to remove the binary data from the commit history. It isn't much, but it does stack up. I can do it when I merge the PR, but that will remove your name from the commits and I really do prefer to have community members to have their name in the commit history to give credit ❤️ |
Fully understandable :) It is gone from the history now ;) |
@rasmus can I do more to get this in? |
I have some time this weekend and will go though it. Sorry for the wait. I'll test out copilot reviews as a means to support me. |
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.
PR Overview
This PR upgrades the project from Entity Framework v0 to v1 by converting synchronous APIs to asynchronous ones and updating dependency injection patterns across test projects. Key changes include:
- Replacing IRootResolver with IServiceProvider in test configuration methods.
- Migrating from synchronous Apply methods to async ApplyAsync methods in read models.
- Updating in-memory table implementations and factories to include new logger parameters and additional dependencies.
Reviewed Changes
File | Description |
---|---|
Source/EventFlow.EntityFramework.Tests/InMemory/InMemoryDbContextProvider.cs | Updates the in-memory database name to include a GUID for isolation. |
Source/EventFlow.EntityFramework.Tests/PostgreSql/EfPostgreSqlSnapshotTests.cs | Converts resolver creation to a method returning IServiceProvider and uses AddTransient for DI. |
Source/EventFlow.EntityFramework.Tests/InMemory/EfInMemoryEventStoreTests.cs; EfInMemorySnapshotTests.cs; EfInMemoryReadStoreTests.cs | Similar conversion in in-memory tests, ensuring consistent DI patterns and singleton lifetimes. |
Source/EventFlow.EntityFramework.Tests/MsSql/* and PostgreSql/* tests | Update resolver configuration and tear down logic (passing Logger) to support EF v1. |
Source/EventFlow.EntityFramework.Tests/InMemory/Infrastructure/IndexingInMemoryTable.cs | Adjusts method signatures (adding logger parameters and new methods) to align with new EF v1 API requirements. |
Source/EventFlow.EntityFramework.Tests/EntityFrameworkTestExtensions.cs | Replaces legacy service registration methods with AddTransient. |
Source/EventFlow.EntityFramework.Tests/Model/* and MsSql/IncludeTests/ReadModels/* | Migrates synchronous Apply methods to async ApplyAsync implementations. |
Source/EventFlow.EntityFramework.Tests/InMemory/Infrastructure/IndexingInMemoryTableFactory.cs | Updates the constructor signature to expect an additional dependency reflecting EF v1 changes. |
Copilot reviewed 36 out of 36 changed files in this pull request and generated no comments.
@rasmus We are delivering a product build on EventFlow, with ef-core in a month. Do you think it would be possible to get this in before, so we can deliver this with a stable package from you? |
Yes. I'll pick up the pace... significantly... and get it shipped |
I'll see if I can get this shipped today |
@MMonrad successfully released as 1.2.0 here https://www.nuget.org/packages/EventFlow.EntityFramework/1.2.0 Its a new package for v1, let me know if there's any trouble. |
This PR is upgrading Entity Framework from v0 to v1