Exemple #1
0
        public LogDTO AddEventLog(EventLogDTO logDto)
        {
            User user = null;

            //this check must be move to domain servi
            if (!string.IsNullOrWhiteSpace(logDto.UserName))
            {
                user = userRep.GetUserById(new PartyId(logDto.UserName));
            }
            var log = logService.AddEventLog(logDto.Code, LogLevel.FromDisplayName <LogLevel>(logDto.LogLevel),
                                             user, logDto.ClassName, logDto.MethodName, logDto.Title, logDto.Messages);

            return(logDTOMapper.MapToModel(log));
        }