mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
37 lines
1.2 KiB
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
|
using Volo.Abp.Domain;
|
|
using Volo.Abp.Domain.Repositories.MongoDB;
|
|
using Volo.Abp.Modularity;
|
|
using Volo.Abp.MongoDB.DependencyInjection;
|
|
using Volo.Abp.Uow.MongoDB;
|
|
|
|
namespace Volo.Abp.MongoDB
|
|
{
|
|
[DependsOn(typeof(AbpDddDomainModule))]
|
|
public class AbpMongoDbModule : AbpModule
|
|
{
|
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.AddConventionalRegistrar(new AbpMongoDbConventionalRegistrar());
|
|
}
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.TryAddTransient(
|
|
typeof(IMongoDbContextProvider<>),
|
|
typeof(UnitOfWorkMongoDbContextProvider<>)
|
|
);
|
|
|
|
context.Services.TryAddTransient(
|
|
typeof(IMongoDbRepositoryFilterer<>),
|
|
typeof(MongoDbRepositoryFilterer<>)
|
|
);
|
|
|
|
context.Services.TryAddTransient(
|
|
typeof(IMongoDbRepositoryFilterer<,>),
|
|
typeof(MongoDbRepositoryFilterer<,>)
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|