IAzureCosmosDbUpdateOrCreateTemplate Method

Update or Creates a template in the database

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
Task UpdateOrCreateTemplate(
	TemplateDto templateItem,
	Guid companyId,
	UserSessionData createdBy,
	CancellationToken cancellationToken = default
)

Parameters

templateItem  TemplateDto
Original template
companyId  Guid
Company ID. If left Empty, the template is a company-agnostic one.
createdBy  UserSessionData
User creating the template
cancellationToken  CancellationToken  (Optional)
Cancellation token (optional)

Return Value

Task
Cosmos DB Object-creation Task

Exceptions

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

See Also