From a8b6d93cb05ea92d30b8d3b052730aa500b3f18f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 20 Mar 2020 14:13:17 +0300 Subject: [PATCH] Should set auto mapping context for ETOs. Also, added missing dependency to AbpAutoMapperModule --- .../Volo/Abp/Identity/IdentityRoleEto.cs | 3 --- .../Volo/Abp/Identity/AbpIdentityDomainModule.cs | 11 +++++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs index ea10f1e41c..8e91eadf72 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; namespace Volo.Abp.Identity { @@ -11,8 +10,6 @@ namespace Volo.Abp.Identity public Guid? TenantId { get; set; } public string Name { get; set; } - - public string NormalizedName { get; set; } public bool IsDefault { get; set; } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs index 38955de588..b0b3dad266 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs @@ -13,22 +13,25 @@ namespace Volo.Abp.Identity [DependsOn( typeof(AbpDddDomainModule), typeof(AbpIdentityDomainSharedModule), - typeof(AbpUsersDomainModule) + typeof(AbpUsersDomainModule), + typeof(AbpAutoMapperModule) )] public class AbpIdentityDomainModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { + context.Services.AddAutoMapperObjectMapper(); + Configure(options => { - options.AddProfile(); + options.AddProfile(validate: true); }); Configure(options => { options.EtoMappings.Add(); - options.EtoMappings.Add(); - options.EtoMappings.Add(); + options.EtoMappings.Add(typeof(AbpIdentityDomainModule)); + options.EtoMappings.Add(typeof(AbpIdentityDomainModule)); }); var identityBuilder = context.Services.AddAbpIdentity(options =>