From 3bce9784a44df0469d212ac6a602b5d5419dd653 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Wed, 30 Dec 2020 22:05:39 +0800 Subject: [PATCH] Configure custom repositories in BloggingEntityFrameworkCoreModule --- .../BloggingEntityFrameworkCoreModule.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreModule.cs b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreModule.cs index 6e46982e44..3fc1a91323 100644 --- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreModule.cs +++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo/Blogging/EntityFrameworkCore/BloggingEntityFrameworkCoreModule.cs @@ -1,6 +1,11 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.Modularity; +using Volo.Blogging.Blogs; +using Volo.Blogging.Comments; +using Volo.Blogging.Posts; +using Volo.Blogging.Tagging; +using Volo.Blogging.Users; namespace Volo.Blogging.EntityFrameworkCore { @@ -11,7 +16,14 @@ namespace Volo.Blogging.EntityFrameworkCore { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddAbpDbContext(); + context.Services.AddAbpDbContext(options => + { + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + options.AddRepository(); + }); } } }