CQRS.NET  2.2
A lightweight enterprise framework to write CQRS, event-sourced and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.

◆ SingleOrDefault< TData >() [1/2]

static TData System.Linq.AzureDocumentDbDataStoreExtensions.SingleOrDefault< TData > ( this AzureDocumentDbDataStore< TData >  source)
static

Returns the only element of the sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.

Parameters
sourceThe sequence to type as IEnumerable<T>.
Template Parameters
TDataThe type of the elements of source.
Returns
The single element of the sequence.
Type Constraints
TData :AzureDocumentDbEntity