version 2
This commit is contained in:
@@ -21,6 +21,16 @@ public sealed class MappingProfile : Profile
|
||||
.ReverseMap()
|
||||
.ForMember(dest => dest.Device, opt => opt.Ignore());
|
||||
|
||||
CreateMap<Domain.AlertCondition, AlertConditionDto>()
|
||||
.ForMember(dest => dest.DeviceName, opt => opt.MapFrom(src => src.Device.DeviceName))
|
||||
.ReverseMap()
|
||||
.ForMember(dest => dest.Device, opt => opt.Ignore());
|
||||
|
||||
CreateMap<Domain.AlertRule, AlertRuleDto>().ReverseMap()
|
||||
.ForMember(dest => dest.AlertCondition, opt => opt.Ignore());
|
||||
|
||||
CreateMap<CreateAlertRuleRequest, Domain.AlertRule>();
|
||||
|
||||
CreateMap<Domain.User, UserDto>().ReverseMap();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user