Queryable.ExceptBy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ExceptBy<TSource,TKey>(IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource,TKey>>, IEqualityComparer<TKey>) |
Produces the set difference of two sequences according to a specified key selector function. |
ExceptBy<TSource,TKey>(IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource,TKey>>) |
Produces the set difference of two sequences according to a specified key selector function. |
ExceptBy<TSource,TKey>(IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource,TKey>>, IEqualityComparer<TKey>)
Produces the set difference of two sequences according to a specified key selector function.
public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
static System::Linq::IQueryable<TSource> ^ ExceptBy(System::Linq::IQueryable<TSource> ^ source1, System::Collections::Generic::IEnumerable<TKey> ^ source2, System::Linq::Expressions::Expression<Func<TSource, TKey> ^> ^ keySelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Linq.IQueryable<TSource> ExceptBy<TSource,TKey> (this System.Linq.IQueryable<TSource> source1, System.Collections.Generic.IEnumerable<TKey> source2, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer);
static member ExceptBy : System.Linq.IQueryable<'Source> * seq<'Key> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Linq.IQueryable<'Source>
<Extension()>
Public Function ExceptBy(Of TSource, TKey) (source1 As IQueryable(Of TSource), source2 As IEnumerable(Of TKey), keySelector As Expression(Of Func(Of TSource, TKey)), comparer As IEqualityComparer(Of TKey)) As IQueryable(Of TSource)
Type Parameters
- TSource
The type of the elements of the input sequence.
- TKey
The type of key to identify elements by.
Parameters
- source1
- IQueryable<TSource>
An IQueryable<T> whose keys that are not also in source2
will be returned.
- source2
- IEnumerable<TKey>
An IEnumerable<T> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.
- keySelector
- Expression<Func<TSource,TKey>>
A function to extract the key for each element.
- comparer
- IEqualityComparer<TKey>
An IEqualityComparer<T> to compare keys.
Returns
A IQueryable<T> that contains the set difference of the elements of two sequences.
Applies to
ExceptBy<TSource,TKey>(IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource,TKey>>)
Produces the set difference of two sequences according to a specified key selector function.
public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
static System::Linq::IQueryable<TSource> ^ ExceptBy(System::Linq::IQueryable<TSource> ^ source1, System::Collections::Generic::IEnumerable<TKey> ^ source2, System::Linq::Expressions::Expression<Func<TSource, TKey> ^> ^ keySelector);
public static System.Linq.IQueryable<TSource> ExceptBy<TSource,TKey> (this System.Linq.IQueryable<TSource> source1, System.Collections.Generic.IEnumerable<TKey> source2, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector);
static member ExceptBy : System.Linq.IQueryable<'Source> * seq<'Key> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> -> System.Linq.IQueryable<'Source>
<Extension()>
Public Function ExceptBy(Of TSource, TKey) (source1 As IQueryable(Of TSource), source2 As IEnumerable(Of TKey), keySelector As Expression(Of Func(Of TSource, TKey))) As IQueryable(Of TSource)
Type Parameters
- TSource
The type of the elements of the input sequence.
- TKey
The type of key to identify elements by.
Parameters
- source1
- IQueryable<TSource>
An IQueryable<T> whose keys that are not also in source2
will be returned.
- source2
- IEnumerable<TKey>
An IEnumerable<T> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.
- keySelector
- Expression<Func<TSource,TKey>>
A function to extract the key for each element.
Returns
A IQueryable<T> that contains the set difference of the elements of two sequences.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback을 참조하세요.
출시 예정: 2024년 내내 콘텐츠 피드백 메커니즘인 GitHub 문제를 단계적으로 폐지하고 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은다음에 대한 사용자 의견 제출 및 보기