Abp模块
abp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
766 B

using AutoMapper;
namespace Sanhe.Abp.MenuManagement;
public class MenuManagementApplicationAutoMapperProfile : Profile
{
public MenuManagementApplicationAutoMapperProfile()
{
CreateMap<Menu, MenuDto>();
CreateMap<CreateOrUpdateMenuDto, Menu>();
CreateMap<Menu, FrontMenu>()
.ForMember(d => d.Component, opt => { opt.MapFrom(s => s.ComponentPath); })
.ForMember(d => d.Path, opt => { opt.MapFrom(s => s.RouterPath); })
.ForMember(d => d.Meta,
opt =>
{
opt.MapFrom(s => new MenuMeta
{
Icon = s.Icon,
Title = s.DisplayName
});
});
}
}