IAzureCosmosDbGetAccountByEmailAddress Method

Tries to find an AccountDto by its EmailAddress. This method is often used for login purposes and to ensure that for newly created accounts the email address is unique.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
Task<AccountDto> GetAccountByEmailAddress(
	IHasEmailAddress emailAddress,
	bool isNewAccount = false,
	CancellationToken cancellationToken = default
)

Parameters

emailAddress  IHasEmailAddress
EmailAddress to compare against
isNewAccount  Boolean  (Optional)
if a new account is being created
cancellationToken  CancellationToken  (Optional)
Cancellation token

Return Value

TaskAccountDto
Account (if found, otherwise )

See Also