IAzureCosmosDbCreateSettings Method

Creates a Settings model in the database.

Definition

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