|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Volo.Abp.AutoMapper; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.AutoMapper; |
|
|
|
using Volo.Abp.Domain; |
|
|
|
using Volo.Abp.EventBus.Distributed; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
@ -11,23 +12,26 @@ namespace Volo.Blogging |
|
|
|
{ |
|
|
|
[DependsOn( |
|
|
|
typeof(BloggingDomainSharedModule), |
|
|
|
typeof(AbpDddDomainModule))] |
|
|
|
typeof(AbpDddDomainModule), |
|
|
|
typeof(AbpAutoMapperModule))] |
|
|
|
public class BloggingDomainModule : AbpModule |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
Configure<AbpDistributedEventBusOptions>(options => |
|
|
|
{ |
|
|
|
options.EtoMappings.Add<Blog, BlogEto>(); |
|
|
|
options.EtoMappings.Add<Comment, CommentEto>(); |
|
|
|
options.EtoMappings.Add<Post, PostEto>(); |
|
|
|
options.EtoMappings.Add<Tag, TagEto>(); |
|
|
|
}); |
|
|
|
context.Services.AddAutoMapperObjectMapper<BloggingDomainModule>(); |
|
|
|
|
|
|
|
Configure<AbpAutoMapperOptions>(options => |
|
|
|
{ |
|
|
|
options.AddProfile<BloggingDomainMappingProfile>(validate: true); |
|
|
|
}); |
|
|
|
|
|
|
|
Configure<AbpDistributedEventBusOptions>(options => |
|
|
|
{ |
|
|
|
options.EtoMappings.Add<Blog, BlogEto>(typeof(BloggingDomainModule)); |
|
|
|
options.EtoMappings.Add<Comment, CommentEto>(typeof(BloggingDomainModule)); |
|
|
|
options.EtoMappings.Add<Post, PostEto>(typeof(BloggingDomainModule)); |
|
|
|
options.EtoMappings.Add<Tag, TagEto>(typeof(BloggingDomainModule)); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|