mirror of https://github.com/abpframework/abp.git
5 changed files with 62 additions and 3 deletions
@ -0,0 +1,10 @@ |
|||||
|
using MongoDB.Driver; |
||||
|
using Volo.Abp.MongoDB; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName.MongoDb |
||||
|
{ |
||||
|
public class MyProjectNameMongoDbContext : AbpMongoDbContext |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Volo.Abp.Identity.MongoDB; |
||||
|
using Volo.Abp.Modularity; |
||||
|
using Volo.Abp.PermissionManagement.MongoDB; |
||||
|
using Volo.Abp.SettingManagement.MongoDB; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName.MongoDb |
||||
|
{ |
||||
|
[DependsOn( |
||||
|
typeof(AbpPermissionManagementMongoDbModule), |
||||
|
typeof(AbpSettingManagementMongoDbModule), |
||||
|
typeof(AbpIdentityMongoDbModule) |
||||
|
)] |
||||
|
public class MyProjectNameMongoDbModule : AbpModule |
||||
|
{ |
||||
|
public override void ConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
context.Services.AddMongoDbContext<MyProjectNameMongoDbContext>(options => |
||||
|
{ |
||||
|
options.AddDefaultRepositories(); |
||||
|
}); |
||||
|
|
||||
|
context.Services.AddAssemblyOf<MyProjectNameMongoDbModule>(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>netcoreapp2.1</TargetFramework> |
||||
|
<RootNamespace>MyCompanyName.MyProjectName</RootNamespace> |
||||
|
</PropertyGroup> |
||||
|
|
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\MyCompanyName.MyProjectName.Domain\MyCompanyName.MyProjectName.Domain.csproj" /> |
||||
|
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.MongoDB\Volo.Abp.PermissionManagement.MongoDB.csproj" /> |
||||
|
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.MongoDB\Volo.Abp.SettingManagement.MongoDB.csproj" /> |
||||
|
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.MongoDB\Volo.Abp.Identity.MongoDB.csproj" /> |
||||
|
</ItemGroup> |
||||
|
|
||||
|
</Project> |
||||
Loading…
Reference in new issue