IAzureCosmosDbCreateSettings Method

Creates a Settings model in the database.

Definition

Namespace: MobileTrack.DataContainers.Cosmos
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
Task<SettingsDto> CreateSettings(
	SettingsDto settings,
	UserSessionData createdBy,
	CancellationToken cancellationToken = default
)

Parameters

settings  SettingsDto
Settings to create
createdBy  UserSessionData
User creating the Settings
cancellationToken  CancellationToken  (Optional)
Cancellation token (optional)

Return Value

TaskSettingsDto
Cosmos DB Object-creation Task

Exceptions

UnauthorizedAccessException Thrown if the user createdBy did not have the correct permissions (will not be thrown if the user is making the settings for themselves)
ArgumentNullExceptionThrown if settings or createdBy was
ResourceInvalidStateExceptionThrown if settings is in an invalid state.

See Also