Method DeferredSingleOrDefault
DeferredSingleOrDefault<TSource>(IQueryable<TSource>)
This method is the deferred implementation of the extension method
Declaration
public static QueryDeferred<TSource> DeferredSingleOrDefault<TSource>(this IQueryable<TSource> source)
Parameters
Type | Name | Description |
---|---|---|
IQueryable<TSource> | source | An System.Linq.IQueryable`1 to return the single element of. |
Returns
Type | Description |
---|---|
QueryDeferred<TSource> | The single element of the input sequence, or default(TSource) if the sequence contains no elements. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the elements of source. |
DeferredSingleOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource, Boolean>>)
This method is the deferred implementation of the extension method
Declaration
public static QueryDeferred<TSource> DeferredSingleOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)
where TSource : class
Parameters
Type | Name | Description |
---|---|---|
IQueryable<TSource> | source | An System.Linq.IQueryable`1 to return a single element from. |
Expression<Func<TSource, System.Boolean>> | predicate | A function to test an element for a condition. |
Returns
Type | Description |
---|---|
QueryDeferred<TSource> | The single element of the input sequence that satisfies the condition in predicate. |
Type Parameters
Name | Description |
---|---|
TSource | The type of the elements of source. |