30 lines
944 B
C#
30 lines
944 B
C#
using JiShe.CollectBus.EntityFrameworkCore;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Volo.Abp.Modularity;
|
|
using Volo.Abp.Timing;
|
|
|
|
namespace JiShe.CollectBus.MongoDB
|
|
{
|
|
[DependsOn(typeof(AbpTimingModule),
|
|
typeof(JiSheCollectBusEntityFrameworkCoreModule))]
|
|
public class JiSheCollectBusMongoDbModule: AbpModule
|
|
{
|
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
|
|
}
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.AddSingleton<IMongoContext, MongoContext>();
|
|
context.Services.AddSingleton<IUnitOfWork, UnitOfWork>();
|
|
context.Services.AddSingleton(typeof(IMongoRepository<>), typeof(MongoBaseRepository<>));
|
|
|
|
Configure<AbpClockOptions>(options =>
|
|
{
|
|
options.Kind = DateTimeKind.Local;
|
|
});
|
|
}
|
|
}
|
|
}
|