JiShe.CollectBus/JiShe.CollectBus.MongoDB/JiSheCollectBusMongoDBModule.cs

16 lines
537 B
C#
Raw Normal View History

2024-11-13 00:30:24 +08:00
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
2024-10-30 17:49:05 +08:00
namespace JiShe.CollectBus.MongoDB
{
2024-11-13 00:30:24 +08:00
public class JiSheCollectBusMongoDbModule: AbpModule
2024-10-30 17:49:05 +08:00
{
2024-11-13 00:30:24 +08:00
public override void ConfigureServices(ServiceConfigurationContext context)
2024-10-30 17:49:05 +08:00
{
2024-11-12 18:18:43 +08:00
context.Services.AddSingleton<IMongoContext, MongoContext>();
context.Services.AddSingleton<IUnitOfWork, UnitOfWork>();
context.Services.AddSingleton(typeof(IMongoRepository<>), typeof(MongoBaseRepository<>));
2024-10-30 17:49:05 +08:00
}
}
}