using System.Reflection; using Abp.Authorization; using Abp.AutoMapper; using Abp.Modules; using Abp.Notifications; using WeApp.BaseSystem.Notifications.Dto; using IwbZero.Authorization.Base.Permissions; namespace WeApp { [DependsOn( typeof(WeAppDataModule), typeof(AbpAutoMapperModule) )] public class WeAppApplicationModule : AbpModule { public override void PreInitialize() { } public override void Initialize() { IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly()); // TODO: Is there somewhere else to store these, with the dto classes Configuration.Modules.AbpAutoMapper().Configurators.Add(cfg => { // Role and permission cfg.CreateMap().ConvertUsing(r => r.Name); cfg.CreateMap().ConvertUsing(r => r.Name); cfg.CreateMap(); //cfg.CreateMap().ForMember(a=>a.SceneCategoryName,o=>o.MapFrom(a=>a.SceneCategoryInfo != null ? a.SceneCategoryInfo.CategoryName : "")); }); } } }