//[doc-params]
{
"DB": ["EF", "Mongo"]
}
The Notification Center Module is an Abp application module that can be easily integrated into your application system to facilitate the publishing and receiving of notifications.
-
Install the
Dignite.Abp.NotificationCenter.Domain.Shared
NuGet package in theDomain.Shared
project.Add
DigniteAbpNotificationCenterDomainSharedModule
to the[DependsOn(...)]
attribute list in your module class. -
Install the
Dignite.Abp.NotificationCenter.Domain
NuGet package in the Domain project.Similarly, add
DigniteAbpNotificationCenterDomainModule
to your module class. -
If you are using Entity Framework Core (EF), install the
Dignite.Abp.NotificationCenter.EntityFrameworkCore
NuGet package in the Entity Framework Core project.Add
DigniteAbpNotificationCenterEntityFrameworkCoreModule
to your module class.Add the
builder.ConfigureNotificationCenter()
to theOnModelCreating()
method:protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.ConfigurePermissionManagement(); modelBuilder.ConfigureSettingManagement(); modelBuilder.ConfigureAuditLogging(); modelBuilder.ConfigureIdentity(); modelBuilder.ConfigureFeatureManagement(); modelBuilder.ConfigureTenantManagement(); modelBuilder.ConfigureNotificationCenter(); // Add this line to configure the NotificationCenter Module }
Open the Package Manager Console in Visual Studio, select
DbMigrations
as the default project, and write the following command to add a migration for the NotificationCenter module:add-migration Added_NotificationCenter_Module
Now update the database by running:
update-database
-
If you are using MongoDB, install the
Dignite.Abp.NotificationCenter.MongoDB
NuGet package in the MongoDB project.Add
DigniteAbpNotificationCenterMongoDbModule
to your module class.Similarly, add the
builder.ConfigureNotificationCenter()
to theOnModelCreating()
method:protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.ConfigurePermissionManagement(); modelBuilder.ConfigureSettingManagement(); modelBuilder.ConfigureAuditLogging(); modelBuilder.ConfigureIdentity(); modelBuilder.ConfigureFeatureManagement(); modelBuilder.ConfigureTenantManagement(); modelBuilder.ConfigureNotificationCenter(); // Add this line to configure the NotificationCenter Module }
-
Install the
Dignite.Abp.Notifications.Identity
NuGet package in the Domain project.Similarly, add
DigniteAbpNotificationsIdentityModule
to your module class. -
Install the
Dignite.Abp.NotificationCenter.Application.Contracts
NuGet package in the Application.Contracts project.Add
DigniteAbpNotificationCenterApplicationContractsModule
to your module class. -
Install the
Dignite.Abp.NotificationCenter.Application
NuGet package in the Application project.Add
DigniteAbpNotificationCenterApplicationModule
to your module class. -
Install the
Dignite.Abp.NotificationCenter.HttpApi
NuGet package in the HttpApi project.Add
DigniteAbpNotificationCenterHttpApiModule
to your module class.