diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationModule.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationModule.cs index ef0f583836..b34e918058 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Application/Volo/CmsKit/Admin/CmsKitAdminApplicationModule.cs @@ -6,6 +6,7 @@ namespace Volo.CmsKit.Admin { [DependsOn( typeof(CmsKitAdminApplicationContractsModule), + typeof(AbpAutoMapperModule), typeof(CmsKitCommonApplicationModule) )] public class CmsKitAdminApplicationModule : AbpModule diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebAutoMapperProfile.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebAutoMapperProfile.cs deleted file mode 100644 index 5e1bc71477..0000000000 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebAutoMapperProfile.cs +++ /dev/null @@ -1,14 +0,0 @@ -using AutoMapper; - -namespace Volo.CmsKit.Admin.Web -{ - public class CmsKitAdminWebAutoMapperProfile : Profile - { - public CmsKitAdminWebAutoMapperProfile() - { - /* You can configure your AutoMapper mapping configuration here. - * Alternatively, you can split your mapping configurations - * into multiple profile classes for a better organization. */ - } - } -} diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs index f8ae091733..075d700720 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/CmsKitAdminWebModule.cs @@ -2,7 +2,6 @@ using Microsoft.Extensions.DependencyInjection; using Volo.CmsKit.Admin.Web.Menus; using Volo.Abp.AspNetCore.Mvc.Localization; -using Volo.Abp.AutoMapper; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; using Volo.Abp.VirtualFileSystem; @@ -44,13 +43,7 @@ namespace Volo.CmsKit.Admin.Web Configure(options => { - options.FileSets.AddEmbedded(); - }); - - context.Services.AddAutoMapperObjectMapper(); - Configure(options => - { - options.AddMaps(validate: true); + options.FileSets.AddEmbedded("Volo.CmsKit.Admin.Web"); }); Configure(options => diff --git a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj index 6895d6e0bd..3b548429c1 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj +++ b/modules/cms-kit/src/Volo.CmsKit.Admin.Web/Volo.CmsKit.Admin.Web.csproj @@ -13,7 +13,6 @@ - diff --git a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs index 862213ab7a..0149722671 100644 --- a/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs +++ b/modules/cms-kit/src/Volo.CmsKit.Public.Web/CmsKitPublicWebModule.cs @@ -44,7 +44,7 @@ namespace Volo.CmsKit.Public.Web Configure(options => { - options.FileSets.AddEmbedded(); + options.FileSets.AddEmbedded("Volo.CmsKit.Public.Web"); }); context.Services.AddAutoMapperObjectMapper();