/// <summary> /// This query-builder method creates a new query whose results are all of /// the results of this query, except those that are also part of the other /// query specified. /// </summary> /// <param name="query"> A query representing the results to exclude. </param> /// <returns> a new ObjectQuery instance. </returns> /// <exception cref="T:System.ArgumentNullException">If the query parameter is null.</exception> public ObjectQuery <T> Except(ObjectQuery <T> query) { Check.NotNull <ObjectQuery <T> >(query, nameof(query)); if (ObjectQuery <T> .IsLinqQuery((ObjectQuery)this) || ObjectQuery <T> .IsLinqQuery((ObjectQuery)query)) { return((ObjectQuery <T>) this.Except <T>((IEnumerable <T>)query)); } return(new ObjectQuery <T>(EntitySqlQueryBuilder.Except(this.QueryState, query.QueryState))); }
/// <summary> /// This query-builder method creates a new query whose results are all of /// the results of this query, except those that are also part of the other /// query specified. /// </summary> /// <param name="query"> /// A query representing the results to exclude. /// </param> /// <returns> /// a new ObjectQuery instance. /// </returns> /// <exception cref="ArgumentNullException"> /// If the query parameter is null. /// </exception> public ObjectQuery <T> Except(ObjectQuery <T> query) { EntityUtil.CheckArgumentNull(query, "query"); if (IsLinqQuery(this) || IsLinqQuery(query)) { return((ObjectQuery <T>)Queryable.Except(this, query)); } return(new ObjectQuery <T>(EntitySqlQueryBuilder.Except(this.QueryState, query.QueryState))); }