首页 > 解决方案 > 从 AbpZeroModule 覆盖 NotificationStore

问题描述

我需要重写 NotificationStore 的一些方法,所以我创建了自己的类来扩展 Abp.Notifications.NotificationStore

我应该在哪里告诉框架使用我的实现而不是 Abp 模块零通知存储。

我试图在核心模块中调用 iocManager.register,但 NotificationStore 仍在调用。

标签: c#aspnetboilerplate

解决方案


阅读有关替换内置服务的文档。

// using Abp.Configuration.Startup;

Configuration.ReplaceService<INotificationStore, MyNotificationStore>(DependencyLifeStyle.Transient);

推荐阅读