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
dataClass
IDataClassData class to be deleted.
DeleteAsync(IDataClass, CancellationToken)
Asynchronously deletes dataClass
from the store.
Task DeleteAsync(IDataClass dataClass, CancellationToken cancellationToken = default)
Parameters
dataClass
IDataClassData class to be deleted.
cancellationToken
CancellationTokenThe 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
dataClass
IDataClassData class to be inserted.
initializeId
boolA 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
dataClass
IDataClassData class to be inserted.
initializeId
boolA value indicating whether to set the
dataClass
's ID column value to the value of the inserted record.cancellationToken
CancellationTokenThe 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
dataClass
IDataClassData class to be updated.
UpdateAsync(IDataClass, CancellationToken)
Asynchronously updates dataClass
in the store.
Task UpdateAsync(IDataClass dataClass, CancellationToken cancellationToken = default)
Parameters
dataClass
IDataClassData class to be updated.
cancellationToken
CancellationTokenThe 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
dataClass
IDataClassData class to be updated or inserted.
existingWhere
WhereConditionWhere condition to determine whether the
dataClass
already 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
dataClass
IDataClassData class to be updated or inserted.
existingWhere
WhereConditionWhere condition to determine whether the
dataClass
already exists in the store.cancellationToken
CancellationTokenThe cancellation instruction.
Returns
- Task
Remarks
For compatibility reasons, the interface provides default implementation which invokes the synchronous Upsert(IDataClass, WhereCondition).