GM.Notifications.Persistence
1.0.0
dotnet add package GM.Notifications.Persistence --version 1.0.0
NuGet\Install-Package GM.Notifications.Persistence -Version 1.0.0
<PackageReference Include="GM.Notifications.Persistence" Version="1.0.0" />
<PackageVersion Include="GM.Notifications.Persistence" Version="1.0.0" />
<PackageReference Include="GM.Notifications.Persistence" />
paket add GM.Notifications.Persistence --version 1.0.0
#r "nuget: GM.Notifications.Persistence, 1.0.0"
#:package GM.Notifications.Persistence@1.0.0
#addin nuget:?package=GM.Notifications.Persistence&version=1.0.0
#tool nuget:?package=GM.Notifications.Persistence&version=1.0.0
<p align="center"> <img src="https://raw.githubusercontent.com/gmetskhvarishvili/GM.Notifications/master/icon.png" alt="GM.Notifications" width="140" height="140" /> </p>
GM.Notifications
Multi-channel notifications for .NET. A single AddGMNotifications() call wires up Email,
SMS, WhatsApp, Push, and Slack senders over a persisted, retrying notification model — so your
app can enqueue a notification, let it be delivered with scheduling and retry semantics, and track
its status. Targets .NET 10.
Packages
The eight packages version and release together (lockstep):
| Package | What it gives you |
|---|---|
GM.Notifications |
Meta-package: AddGMNotifications(configuration) registers every channel at once. |
GM.Notifications.Domain |
The NotificationBase aggregate (status / retry / scheduling) and per-channel entities. |
GM.Notifications.Persistence |
EF Core entity configurations for the notification entities (PostgreSQL). |
GM.Notifications.Email |
IEmailSenderService + AddEmailNotificationServices(). |
GM.Notifications.SMS |
ISmsSenderService + AddSmsNotificationServices(). |
GM.Notifications.WhatsApp |
IWhatsAppSenderService + AddWhatsAppNotificationServices(). |
GM.Notifications.Push |
IPushSenderService + AddPushNotificationServices(). |
GM.Notifications.Slack |
ISlackSenderService + AddSlackNotificationServices(). |
dotnet add package GM.Notifications
Quick start
Register every channel with one call — each channel binds its own configuration section:
using GM.Notifications;
builder.Services.AddGMNotifications(builder.Configuration);
Or add only the channels you need:
builder.Services
.AddEmailNotificationServices(builder.Configuration)
.AddSlackNotificationServices(builder.Configuration);
The notification model
Every notification derives from NotificationBase (a SoftDeletableEntity<Guid>), which owns the
delivery lifecycle so a background worker can drive it:
var email = new EmailNotification(
to: "user@example.com",
subject: "Welcome",
body: "<h1>Hi!</h1>",
isHtml: true,
maxRetries: 3,
scheduledAtUtc: null); // send as soon as possible
if (email.IsReadyToSend(DateTime.UtcNow))
{
// ... hand off to IEmailSenderService ...
email.MarkSent(DateTime.UtcNow);
}
- Scheduling —
ScheduledAtUtcholds a notification back until its time arrives. - Retry —
MarkFailed(reason, nowUtc)incrementsRetryCountand keeps the notificationPendinguntilMaxRetriesis reached, at which point it becomesFailed. - Status —
Pending → Sent | Failed | Cancelled, exposed viaNotificationStatus.
Tune the worker/retry defaults through NotificationOptions (MaxRetries,
WorkerIntervalSeconds, WorkerBatchSize).
Repository layout
GM.Notifications/ # meta-package + AddGMNotifications composition
GM.Notifications.Domain/ # NotificationBase + per-channel entities, enums, exceptions
GM.Notifications.Persistence/ # EF Core configurations (PostgreSQL)
GM.Notifications.Email/ # Email channel (service, options, DI)
GM.Notifications.SMS/ # SMS channel
GM.Notifications.WhatsApp/ # WhatsApp channel
GM.Notifications.Push/ # Push channel
GM.Notifications.Slack/ # Slack channel
tests/GM.Notifications.Tests/ # xUnit tests for the notification model
Building & testing
dotnet build -c Release
dotnet test -c Release
Releasing
Versioning is automated from Conventional Commits —
see CONTRIBUTING.md. All eight packages share one version
(Directory.Build.props) and publish together to nuget.org on each release.
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- FluentValidation (>= 12.1.1)
- GM.EntityFramework.Domain (>= 1.2.1)
- GM.EntityFramework.Persistence (>= 1.2.1)
- GM.Notifications.Domain (>= 1.0.0)
- JasperFx (>= 2.24.1)
- Mapster (>= 10.0.10)
- Mapster.Core (>= 10.0.10)
- Mapster.DependencyInjection (>= 10.0.10)
- Mapster.EFCore (>= 10.0.10)
- Microsoft.EntityFrameworkCore (>= 10.0.10)
- Microsoft.EntityFrameworkCore.Abstractions (>= 10.0.10)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.10)
- Microsoft.Extensions.Caching.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Caching.Memory (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Primitives (>= 10.0.10)
- Microsoft.OpenApi (>= 2.7.5)
- Newtonsoft.Json (>= 13.0.4)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.3)
- Polly.Core (>= 8.7.0)
- RabbitMQ.Client (>= 7.2.1)
- Spectre.Console (>= 0.57.2)
- System.Linq.Dynamic.Core (>= 1.7.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on GM.Notifications.Persistence:
| Package | Downloads |
|---|---|
|
GM.Notifications
Multi-channel notifications for .NET: a single AddGMNotifications() call wiring Email, SMS, WhatsApp, Push, and Slack senders over a persisted, retrying notification model. This meta-package bundles the GM.Notifications.* packages. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 112 | 8/2/2026 |