Interface IDataClassDataStore
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Declares operations for storing data of an IDataClass instance.
public interface IDataClassDataStore
- Extension Methods
Methods
Delete(IDataClass)
Deletes dataClass from the store.
void Delete(IDataClass dataClass)
Parameters
dataClassIDataClassData class to be deleted.
DeleteAsync(IDataClass, CancellationToken)
Asynchronously deletes dataClass from the store.
Task DeleteAsync(IDataClass dataClass, CancellationToken cancellationToken = default)
Parameters
dataClassIDataClassData class to be deleted.
cancellationTokenCancellationTokenThe cancellation instruction.
Returns
- Task
Remarks
For compatibility reasons, the interface provides default implementation which invokes the synchronous Delete(IDataClass).
Insert(IDataClass, bool)
Inserts dataClass into the store.
void Insert(IDataClass dataClass, bool initializeId = true)
Parameters
dataClassIDataClassData class to be inserted.
initializeIdboolA value indicating whether to set the
dataClass's ID column value to the value of the inserted record.
InsertAsync(IDataClass, bool, CancellationToken)
Asynchronously inserts dataClass into the store.
Task InsertAsync(IDataClass dataClass, bool initializeId = true, CancellationToken cancellationToken = default)
Parameters
dataClassIDataClassData class to be inserted.
initializeIdboolA value indicating whether to set the
dataClass's ID column value to the value of the inserted record.cancellationTokenCancellationTokenThe cancellation instruction.
Returns
- Task
Remarks
For compatibility reasons, the interface provides default implementation which invokes the synchronous Insert(IDataClass, bool).
Update(IDataClass)
Updates dataClass in the store.
void Update(IDataClass dataClass)
Parameters
dataClassIDataClassData class to be updated.
UpdateAsync(IDataClass, CancellationToken)
Asynchronously updates dataClass in the store.
Task UpdateAsync(IDataClass dataClass, CancellationToken cancellationToken = default)
Parameters
dataClassIDataClassData class to be updated.
cancellationTokenCancellationTokenThe cancellation instruction.
Returns
- Task
Remarks
For compatibility reasons, the interface provides default implementation which invokes the synchronous Update(IDataClass).
Upsert(IDataClass, WhereCondition)
Updates or inserts dataClass in the store.
void Upsert(IDataClass dataClass, WhereCondition existingWhere)
Parameters
dataClassIDataClassData class to be updated or inserted.
existingWhereWhereConditionWhere condition to determine whether the
dataClassalready exists in the store.
UpsertAsync(IDataClass, WhereCondition, CancellationToken)
Asynchronously updates or inserts dataClass in the store.
Task UpsertAsync(IDataClass dataClass, WhereCondition existingWhere, CancellationToken cancellationToken = default)
Parameters
dataClassIDataClassData class to be updated or inserted.
existingWhereWhereConditionWhere condition to determine whether the
dataClassalready exists in the store.cancellationTokenCancellationTokenThe cancellation instruction.
Returns
- Task
Remarks
For compatibility reasons, the interface provides default implementation which invokes the synchronous Upsert(IDataClass, WhereCondition).