.Select(x =>
{
var ddValue = x.ComponentHistoryValues.FirstOrDefault(y => y.ComponentHistoryValueGroupID == x.ID);
return new DesignDataItemDto
{
ID = x.DesignDataItem.ID,
Name = x.DesignDataItem.Name,
Units = x.DesignDataItem.Units,
Value = x.DesignDataItem.IsText ? ddValue.ValueString : ddValue.Value.ToString(),
CheckedStatus = x.CheckedStatus,
CheckedBy = x.CheckedBy.Name,
CheckedOnUtc = x.CheckedOnUtc,