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.
25 lines
766 B
25 lines
766 B
3 years ago
|
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
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
}
|