IAzureCosmosDbDeleteEnvironment Method

Deletes an EnvironmentDto from the database

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
Task DeleteEnvironment(
	EnvironmentDto environment,
	UserSessionData deletedBy,
	CancellationToken cancellationToken = default
)

Parameters

environment  EnvironmentDto
Environment to delete
deletedBy  UserSessionData
User deleting the EnvironmentDto
cancellationToken  CancellationToken  (Optional)
Cancellation token

Return Value

Task
Task completion

Exceptions

UnauthorizedAccessExceptionThrown if the user deletedBy did not have the correct permissions
InvalidOperationException Thrown if the environment we're trying to delete is the MainEnvironment of the company.
ArgumentNullExceptionThrown if environment or deletedBy was

See Also