EfCore.GenericEventRunner
2.1.0-preview003
See the version list below for details.
dotnet add package EfCore.GenericEventRunner --version 2.1.0-preview003
NuGet\Install-Package EfCore.GenericEventRunner -Version 2.1.0-preview003
<PackageReference Include="EfCore.GenericEventRunner" Version="2.1.0-preview003" />
paket add EfCore.GenericEventRunner --version 2.1.0-preview003
#r "nuget: EfCore.GenericEventRunner, 2.1.0-preview003"
// Install EfCore.GenericEventRunner as a Cake Addin #addin nuget:?package=EfCore.GenericEventRunner&version=2.1.0-preview003&prerelease // Install EfCore.GenericEventRunner as a Cake Tool #tool nuget:?package=EfCore.GenericEventRunner&version=2.1.0-preview003&prerelease
EfCore.GenericEventRunner
This library allows users of Entity Framework Core (EF Core) to add events to their entity classes, i.e. the classes that EF Core maps to a database. It is useful if you have business rules that are tiggered by a property changing, or an event such as receiving an customer order and you need to check some things before you can accept it.
Version 2 how supports async event handlers and, via the EfCore.GenericEventRunner.DomainParts library, it can support a Clean Code architecture.
Preview 2.1 supports more sorts of events, including ones that run withing a transaction where SaveChanges is called. This allows you to implement Integration events across multiple parts of your application.
This is an open source project (MIT license) available on GitHub and as a NuGet package.
Useful articles
- Article about this event-driven architecture - good to get an idea of what the library is trying to do.
- The "how" and "why" of the EfCore.GenericEventRunner library - read this for detailed documentation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- EfCore.GenericEventRunner.DomainParts (>= 2.1.0-preview004)
- GenericServices.StatusGeneric (>= 1.0.0)
- Microsoft.EntityFrameworkCore (>= 3.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.3.3 | 16,356 | 7/8/2021 |
2.3.2 | 1,661 | 1/25/2021 |
2.3.1 | 362 | 1/22/2021 |
2.3.0 | 4,479 | 11/22/2020 |
2.2.2 | 411 | 11/10/2020 |
2.2.1 | 428 | 11/10/2020 |
2.2.0 | 425 | 11/9/2020 |
2.1.0 | 881 | 9/14/2020 |
2.1.0-preview005 | 298 | 8/28/2020 |
2.1.0-preview003 | 321 | 8/26/2020 |
2.1.0-preview002 | 322 | 8/25/2020 |
2.1.0-preview001 | 330 | 8/25/2020 |
2.0.0 | 451 | 8/12/2020 |
1.2.0 | 6,940 | 1/25/2020 |
1.1.0 | 694 | 12/3/2019 |
1.0.0 | 475 | 11/29/2019 |
- BREAKING CHANGE - the definitions of the events handler has changed. The callingEntity parameter is now an object.
- BREAKING CHANGE - You now need to register exception handlers against the DbContext type. This allows different handlers for multiple DbContexts
- New Feature: Added during event and event handlers. The event is called within a transaction.
- New feature: DuringSaveStage attribute. Allows you move the during event from running after SaveChanges in the transaction to before the call to SaveChanges (but after DetectChanges has been called).
- New Feature: You can now pick what types of events an entity supports by applying the approriate interfaces: IEntityWithBeforeSaveEvents, IEntityWithDuringSaveEvents, and IEntityWithAfterSaveEvents
- New feature: You can inject a action to be run after DeteckChanges is called. Useful for adding last created/updated times.