Browse Source
Merge pull request #6907 from abpframework/liangshiwei/blog-patch-1
Configure custom repositories in BloggingEntityFrameworkCoreModule
pull/7203/head
Halil İbrahim Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
13 additions and
1 deletions
-
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<BloggingDbContext>(); |
|
|
|
context.Services.AddAbpDbContext<BloggingDbContext>(options => |
|
|
|
{ |
|
|
|
options.AddRepository<Blog, EfCoreBlogRepository>(); |
|
|
|
options.AddRepository<BlogUser, EfCoreBlogUserRepository>(); |
|
|
|
options.AddRepository<Post, EfCorePostRepository>(); |
|
|
|
options.AddRepository<Tag, EfCoreTagRepository>(); |
|
|
|
options.AddRepository<Comment, EfCoreCommentRepository>(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|