using System.Reflection; using Abp.Authorization; using Abp.AutoMapper; using Abp.Modules; using Abp.Notifications; using WeOnlineApp.BaseSystem.Notifications.Dto; using IwbZero.Authorization.Base.Permissions; namespace WeOnlineApp { [DependsOn( typeof(WeOnlineAppDataModule), typeof(AbpAutoMapperModule) )] public class WeOnlineAppApplicationModule : 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 : "")); }); } } }