IAzureCosmosDbDeleteRole Method

Deletes RoleDto from the database.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
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

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