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+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
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