src/Inflatable/QueryProvider/QueryResults.cs
/// <summary>
/// Copies the specified return value.
/// </summary>
/// <param name="results">The results.</param>
/// <param name="idProperties">The identifier properties.</param>
Copies the specified return value.
Copies the specified return value .
public void CopyOrAdd(QueryResults results, IEnumerable<IIDProperty> idProperties)
        {
            if (results is null || results.Query.ReturnType != Query.ReturnType)
            {
                return;
            }
            if (!idProperties.Any())
            {
                Values.Add(results.Values);
                return;
            }
            for (int i = 0, resultsValuesCount = results.Values.Count; i < resultsValuesCount; i++)
            {
                var Value = results.Values[i];
                var MyValue = Values.Find(x => idProperties.All(y => y.GetColumnInfo()[0].GetValue(x)?.Equals(y.GetColumnInfo()[0].GetValue(Value)) == true));
                if (MyValue is null)
                {
                    Values.Add(Value);
                }
                else
                {
                    Value.CopyTo(MyValue);
                }
            }
        }
public void CopyOrAdd ( QueryResults results , IEnumerable < IIDProperty > idProperties ) { if ( results is null || results . Query . ReturnType != Query . ReturnType ) { return ; } if ( ! idProperties . Any ( ) ) { Values . Add ( results . Values ) ; return ; } for ( int i = 0 , resultsValuesCount = results . Values . Count ; i < resultsValuesCount ; i ++ ) { var Value = results . Values [ i ] ; var MyValue = Values . Find ( x => idProperties . All ( y => y . GetColumnInfo ( ) [ 0 ] . GetValue ( x ) ? . Equals ( y . GetColumnInfo ( ) [ 0 ] . GetValue ( Value ) ) == true ) ) ; if ( MyValue is null ) { Values . Add ( Value ) ; } else { Value . CopyTo ( MyValue ) ; } } }
Copies the specified return value.
Copies the specified return value .
results
QueryResults
None
idProperties
IEnumerable<IIDProperty>
The identifier properties.
The identifier properties .