Table of Contents

Class WebApiDataStoreService

Namespace
DevExpress.Xpo.DB
Assembly
DevExpress.Xpo.v24.1.dll

A generic DevExpress.Xpo.DB.IDataStore wrapper. Encapsulates the boilerplate code required to implement a Web API service controller for WebApiDataStoreClient.

public class WebApiDataStoreService : ServiceBase
Inheritance
WebApiDataStoreService
Inherited Members

Constructors

WebApiDataStoreService(IDataStore)

Initializes a new instance of the WebApiDataStoreService class with specified settings.

public WebApiDataStoreService(IDataStore inner)

Parameters

inner IDataStore

Methods

ModifyData(ModificationStatement[])

Calls the ModifyData method of the underlying IDataStore with error handling.

public OperationResult<ModificationResult> ModifyData(ModificationStatement[] dmlStatements)

Parameters

dmlStatements ModificationStatement[]

An array of data modification statements.

Returns

OperationResult<ModificationResult>

The result of the data modifications.

ModifyDataAsync(ModificationStatement[], CancellationToken)

Calls the ModifyDataAsync method of the underlying IDataStore with error handling.

public Task<OperationResult<ModificationResult>> ModifyDataAsync(ModificationStatement[] dmlStatements, CancellationToken cancellationToken = default)

Parameters

dmlStatements ModificationStatement[]

An array of data modification statements.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the current operation.

Returns

Task<OperationResult<ModificationResult>>

A Task that returns the result of the data modifications.

ModifyDataWithCookie(WebApiDataContainer<ModificationStatement[]>)

Calls the ICacheToCacheCommunicationCore.ModifyData method with error handling.

public OperationResult<DataCacheModificationResult> ModifyDataWithCookie(WebApiDataContainer<ModificationStatement[]> data)

Parameters

data WebApiDataContainer<ModificationStatement[]>

An object that contains an array of data modification statements.

Returns

OperationResult<DataCacheModificationResult>

The result of the data modifications.

NotifyDirtyTables(WebApiDataContainer<string[]>)

Calls the ICacheToCacheCommunicationCore.NotifyDirtyTables method with error handling.

public OperationResult<DataCacheResult> NotifyDirtyTables(WebApiDataContainer<string[]> data)

Parameters

data WebApiDataContainer<string[]>

An object that contains an array of table names specifying modified tables.

Returns

OperationResult<DataCacheResult>

A Root element’s state.

ProcessCookie(DataCacheCookie)

Calls the ICacheToCacheCommunicationCore.ProcessCookie method with error handling.

public OperationResult<DataCacheResult> ProcessCookie(DataCacheCookie data)

Parameters

data DataCacheCookie

A Root element’s state stored by a specific cache Node.

Returns

OperationResult<DataCacheResult>

A Root element’s state.

SelectData(SelectStatement[])

Calls the SelectData method of the underlying IDataStore with error handling.

public OperationResult<SelectedData> SelectData(SelectStatement[] selects)

Parameters

selects SelectStatement[]

An array of statements to obtain data from the data store.

Returns

OperationResult<SelectedData>

Data retrieved from the data store.

SelectDataAsync(SelectStatement[], CancellationToken)

Calls the SelectDataAsync method of the underlying IDataStore with error handling.

public Task<OperationResult<SelectedData>> SelectDataAsync(SelectStatement[] selects, CancellationToken cancellationToken = default)

Parameters

selects SelectStatement[]

An array of statements to obtain data from the data store.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the current operation.

Returns

Task<OperationResult<SelectedData>>

A task that returns data retrieved from the data store.

SelectDataWithCookie(WebApiDataContainer<SelectStatement[]>)

Calls the ICacheToCacheCommunicationCore.SelectData method with error handling.

public OperationResult<DataCacheSelectDataResult> SelectDataWithCookie(WebApiDataContainer<SelectStatement[]> data)

Parameters

data WebApiDataContainer<SelectStatement[]>

An object that contains an array of query statements.

Returns

OperationResult<DataCacheSelectDataResult>

The result of the data fetch.

UpdateSchema(bool, DBTable[])

Calls the UpdateSchema method of the underlying IDataStore with error handling.

public OperationResult<UpdateSchemaResult> UpdateSchema(bool doNotCreateIfFirstTableNotExist, DBTable[] tables)

Parameters

doNotCreateIfFirstTableNotExist bool

true, if the schema should not be created when the table that corresponds to the first item in the types array does not exist in the storage.

tables DBTable[]

An array of DevExpress.Xpo.DB.DBTable objects that specify tables for which the schema should be created in the data store.

Returns

OperationResult<UpdateSchemaResult>

An DevExpress.Xpo.DB.UpdateSchemaResult value that specifies the result of the update operation.

UpdateSchemaAsync(bool, DBTable[], CancellationToken)

Calls the UpdateSchemaAsync method of the underlying IDataStore with error handling.

public Task<OperationResult<UpdateSchemaResult>> UpdateSchemaAsync(bool doNotCreateIfFirstTableNotExist, DBTable[] tables, CancellationToken cancellationToken = default)

Parameters

doNotCreateIfFirstTableNotExist bool

true, if the schema should not be created when the table that corresponds to the first item in the types array does not exist in the storage.

tables DBTable[]

An array of DevExpress.Xpo.DB.DBTable objects that specify tables for which the schema should be created in the data store.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the current operation.

Returns

Task<OperationResult<UpdateSchemaResult>>

A task that returns an DevExpress.Xpo.DB.UpdateSchemaResult value that specifies the result of the update operation.

UpdateSchemaWithCookie(bool, WebApiDataContainer<DBTable[]>)

Calls the ICacheToCacheCommunicationCore.UpdateSchema method with error handling.

public OperationResult<DataCacheUpdateSchemaResult> UpdateSchemaWithCookie(bool doNotCreateIfFirstTableNotExist, WebApiDataContainer<DBTable[]> data)

Parameters

doNotCreateIfFirstTableNotExist bool

true if the schema should not be created if the table that corresponds to the first item in the tables array doesn’t exist in the cached data store; otherwise, false.

data WebApiDataContainer<DBTable[]>

An object that contains an array of DevExpress.Xpo.DB.DBTable objects that specify tables for which the schema should be created in the data store.

Returns

OperationResult<DataCacheUpdateSchemaResult>

The result of the update operation.