AzureCosmosDbDeleteRole Method

Deletes RoleDto from the database.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
public Task DeleteRole(
	RoleDto role,
	UserSessionData deletedBy,
	CancellationToken cancellationToken = default
)

Parameters

role  RoleDto
Role to deleted
deletedBy  UserSessionData
User deleting the item
cancellationToken  CancellationToken  (Optional)
Cancellation token

Return Value

Task
Task completion

Implements

IAzureCosmosDbDeleteRole(RoleDto, UserSessionData, CancellationToken)

Exceptions

ArgumentNullExceptionThrown if role or deletedBy is .
UnauthorizedAccessExceptionThrown if deletedBy does not have the requirements to execute this method.
ArgumentExceptionThrown if deletedBy is not part of the company role belongs to, or if role is a build-in role.
InvalidOperationExceptionThrown if role is still in use within the company.

See Also