Ejemplo n.º 1
0
 public OperationLogProfile()
 {
     CreateMap <OperationLogResult, OperationLogDto>()
     .ForMember(dest => dest.Module,
                opt => opt.MapFrom((log, dto) => _moduleDict[log.Module]))
     .ForMember(dest => dest.LogType,
                opt => opt.MapFrom((log, dto) => _logTypeDict[log.LogType]))
     .ForMember(dest => dest.OperationTime,
                opt => opt.MapFrom((log, dto) => log.OperationTime.ToString("yyyy-MM-dd HH:mm:ss")))
     .ForMember(dest => dest.IPAddress,
                opt => opt.MapFrom((log, dto) => IPAddressHelper.NumberToIpString(log.IPAddress)));
 }