Returns the only element of the sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
- Parameters
-
predicate | A function to test an element for a condition. |
source | The sequence to type as IEnumerable<T>. |
- Template Parameters
-
TData | The type of the elements of source. |
- Returns
- The single element of the sequence.
- Exceptions
-
ArgumentNullException | predicate is null. |
- Type Constraints
-
TData | : | AzureDocumentDbEntity | |