public static SystemLogDTO Entity2SystemLogDto(this ADMIN_SystemLogToken entity) { return(new SystemLogDTO { id = entity.id , AddOn = entity.CreateDate , Origin = entity.Origin , Exception = entity.Exception , StackTrace = entity.StackTrace , IntId = entity.RecordIntId , Module = entity.RecordObjectType , Level = entity.LogLevel , Message = entity.Message , HostName = entity.HostName , IpAddress = entity.IPAddress , SessionId = entity.SessionId , User = entity.UserId != null ? new BaseUserInfoDTO { UserId = (int)entity.UserId , FullName = entity.Entity2FullName() } : new BaseUserInfoDTO { UserId = -1, FullName = string.Empty } }); }
public static string Entity2FullName(this ADMIN_SystemLogToken entity) { return(CombineFullName(entity.FirstName, entity.LastName, entity.Nickname)); }