EfCore.GenericEventRunner 2.1.0-preview002

This is a prerelease version of EfCore.GenericEventRunner.
There is a newer version of this package available.
See the version list below for details.
dotnet add package EfCore.GenericEventRunner --version 2.1.0-preview002                
NuGet\Install-Package EfCore.GenericEventRunner -Version 2.1.0-preview002                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EfCore.GenericEventRunner" Version="2.1.0-preview002" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EfCore.GenericEventRunner --version 2.1.0-preview002                
#r "nuget: EfCore.GenericEventRunner, 2.1.0-preview002"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EfCore.GenericEventRunner as a Cake Addin
#addin nuget:?package=EfCore.GenericEventRunner&version=2.1.0-preview002&prerelease

// Install EfCore.GenericEventRunner as a Cake Tool
#tool nuget:?package=EfCore.GenericEventRunner&version=2.1.0-preview002&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

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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,404 7/8/2021
2.3.2 1,664 1/25/2021
2.3.1 364 1/22/2021
2.3.0 4,484 11/22/2020
2.2.2 411 11/10/2020
2.2.1 429 11/10/2020
2.2.0 425 11/9/2020
2.1.0 889 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,991 1/25/2020
1.1.0 695 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.
     - 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.