Easy.Notifications.Persistence.EntityFramework 1.0.1

dotnet add package Easy.Notifications.Persistence.EntityFramework --version 1.0.1
                    
NuGet\Install-Package Easy.Notifications.Persistence.EntityFramework -Version 1.0.1
                    
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="Easy.Notifications.Persistence.EntityFramework" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Easy.Notifications.Persistence.EntityFramework" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Easy.Notifications.Persistence.EntityFramework" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Easy.Notifications.Persistence.EntityFramework --version 1.0.1
                    
#r "nuget: Easy.Notifications.Persistence.EntityFramework, 1.0.1"
                    
#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.
#:package Easy.Notifications.Persistence.EntityFramework@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Easy.Notifications.Persistence.EntityFramework&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Easy.Notifications.Persistence.EntityFramework&version=1.0.1
                    
Install as a Cake Tool

Build & Test Build & Release Build & Nuget Publish Release License NuGet

Easy.Notifications.Persistence.EntityFramework

The universal persistence layer for the Easy Notification System.

This package implements the storage logic for Easy.Notifications. It is designed with Multi-Targeting support, making it capable of running on both modern .NET 8 applications (using EF Core) and legacy .NET Framework projects (using EF 6).

By installing this package, you enable audit logging, status tracking, and retry mechanisms for your notifications.

Installation

Install-Package Easy.Notifications.Persistence.EntityFramework

Or via .NET CLI:

dotnet add package Easy.Notifications.Persistence.EntityFramework

Compatibility Matrix

This package automatically adapts its internal implementation based on your project's target framework:

Your Project Target Uses Internally Dependency
.NET 6.0+ (Core) Entity Framework Core Microsoft.EntityFrameworkCore.SqlServer
.NET Framework 4.7+ Entity Framework 6 EntityFramework (Classic)

Configuration

1. For .NET 6+ / .NET Core (EF Core)

In your Program.cs, use the extension method to register the storage.

using Microsoft.EntityFrameworkCore;

var builder = WebApplication.CreateBuilder(args);

// 1. Add the Main Engine
builder.Services.AddEasyNotifications();

// 2. Add Persistence (EF Core)
var connectionString = builder.Configuration.GetConnectionString("NotificationDb");

builder.Services.AddNotificationPersistence(options =>
{
    // Use SQL Server (or any other EF Core provider)
    options.UseSqlServer(connectionString);
});

2. For .NET Framework 4.7+ (EF 6)

In legacy applications (e.g., ASP.NET MVC 5), you typically register dependencies using a container like Unity, Autofac, or Ninject.

// Example using a generic DI container
var connectionString = ConfigurationManager.ConnectionStrings["NotificationDb"].ConnectionString;

// Register the Store Implementation
container.RegisterType<INotificationStore, EfNotificationStore>(
    new ConstructorArgument("connectionString", connectionString)
);

Database Setup

The package contains the NotificationLogs entity. You need to create this table in your database.

Option A: Auto-Generate (Development)

For .NET Core apps, you can ensure the database is created at startup:

using (var scope = app.Services.CreateScope())
{
    var context = scope.ServiceProvider.GetRequiredService<NotificationDbContext>();
    context.Database.EnsureCreated();
}

Option B: Migrations (Production)

Since the DbContext is embedded within this library, you can generate migrations from your host application:

dotnet ef migrations add InitialCreate --context NotificationDbContext
dotnet ef database update --context NotificationDbContext

(For EF6 .NET Framework projects, use the standard Enable-Migrations and Update-Database commands in Package Manager Console).

Features

  • Unified History: Logs every email, SMS, and chat message sent via the system.

  • Retry Support: Allows the background worker to fetch failed messages from the database and retry them.

  • Group Cancellation: Persists cancellation requests to ensure stopped campaigns remain stopped even after a server restart.

  • Dashboard Ready: Provides the data source for the Easy.Notifications dashboard analytics.

The Ecosystem

Package Description
Easy.Notifications.Core Abstractions, Interfaces, and Models.
Easy.Notifications The main engine (Worker, Dispatcher, Providers).
Easy.Notifications.Persistence.EntityFramework (You are here) Storage implementation for EF Core & EF 6.

Contributing

Contributions and suggestions are welcome. Please open an issue or submit a pull request.


Contact

For questions, contact us via elmin.alirzayev@gmail.com or GitHub.


License

This project is licensed under the MIT License.


© 2025 Elmin Alirzayev / Easy Code Tools

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net47 is compatible.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
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
1.0.1 121 2/9/2026
1.0.0 117 2/6/2026

-