ItemBaseRepositoryTUpdate Method

Update values of a business object in the cloud

Definition

Namespace: MobileTrack.DataContainers.Repositories
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
internal Task Update(
	T newValue,
	T oldValue,
	AccountDto? updatedBy,
	bool preventVersionIncrement = false,
	CancellationToken cancellationToken = default
)

Parameters

newValue  T
The new value of the item
oldValue  T
Former value of the item
updatedBy  AccountDto
AccountDto updating the item
preventVersionIncrement  Boolean  (Optional)
If set to , we won't increment the version number, regardless if T is composed of IHasVersion
cancellationToken  CancellationToken  (Optional)
Cancellation Token, which will be inserted in the Azure Tasks

Return Value

Task
Task completion

Exceptions

InvalidOperationExceptionIf the item was not updated
ArgumentNullExceptionupdatedBy is not allowed to be if T is derived from IModifiedStats!

See Also