IAzureCosmosDbCreateCompany Method

Creates a company in the database. This method can only be executed by MobileTrack employees.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
Task<CompanyDto> CreateCompany(
	CompanyDto company,
	UserSessionData createdBy,
	CancellationToken cancellationToken = default
)

Parameters

company  CompanyDto
Company to create
createdBy  UserSessionData
User creating the company
cancellationToken  CancellationToken  (Optional)
Cancellation token (optional)

Return Value

TaskCompanyDto
Cosmos DB Object-creation Task

Exceptions

UnauthorizedAccessExceptionThrown if the user createdBy did not have the correct permissions
ArgumentNullExceptionThrown if company or createdBy was
ResourceInvalidStateExceptionThrown if company is in an invalid state.

See Also