Class DataAdaptor<T>
Abstract class for Data adaptors.
Inherited Members
Namespace: Syncfusion.Blazor
Assembly: Syncfusion.Blazor.dll
Syntax
public abstract class DataAdaptor<T> : OwningComponentBase<T>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IDataAdaptor where T : notnull
Type Parameters
| Name |
|---|
| T |
Remarks
Extend DataAdaptor{T} component while creating custom adaptor component. DataAdaptor{T} component is extended from OwningComponentBase<TService> so that services can be accessed from Service property.
Constructors
DataAdaptor()
Declaration
protected DataAdaptor()
Methods
BatchUpdate(DataManager, object, object, object, string, string, int?)
Performs Batch CRUD operations synchronously.
Declaration
public virtual object BatchUpdate(DataManager dataManager, object changedRecords, object addedRecords, object deletedRecords, string primaryColumnName, string key, int? dropIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | |
| object | changedRecords | |
| object | addedRecords | |
| object | deletedRecords | |
| string | primaryColumnName | |
| string | key | |
| int? | dropIndex |
Returns
| Type |
|---|
| object |
BatchUpdateAsync(DataManager, object, object, object, string, string, int?)
Performs Batch CRUD operations asynchronously.
Declaration
public virtual Task<object> BatchUpdateAsync(DataManager dataManager, object changedRecords, object addedRecords, object deletedRecords, string primaryColumnName, string key, int? dropIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | |
| object | changedRecords | |
| object | addedRecords | |
| object | deletedRecords | |
| string | primaryColumnName | |
| string | key | |
| int? | dropIndex |
Returns
| Type |
|---|
| Task<object> |
Insert(DataManager, object, string)
Inserts a new data item into the data collection.
Declaration
public virtual object Insert(DataManager dataManager, object record, string additionalParam)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | The DataManager is a data management component used for performing data operations in applications. |
| object | record | The new record which is need to be inserted. |
| string | additionalParam | An optional parameter that can be used to perform additional data operations. |
Returns
| Type | Description |
|---|---|
| object | Returns the newly inserted record details. |
InsertAsync(DataManager, object, string)
Inserts a new data item into the data collection.
Declaration
public virtual Task<object> InsertAsync(DataManager dataManager, object record, string additionalParam)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | The DataManager is a data management component used for performing data operations in applications. |
| object | record | The new record which is need to be inserted. |
| string | additionalParam | An optional parameter that can be used to perform additional data operations. |
Returns
| Type | Description |
|---|---|
| Task<object> | Returns the newly inserted record details. |
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Initializes the data adaptor instance and sets the parent component relationship.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous operation. |
Overrides
Read(DataManagerRequest, string)
Performs data Read operation synchronously.
Declaration
public virtual object Read(DataManagerRequest dataManagerRequest, string additionalParam = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManagerRequest | dataManagerRequest | |
| string | additionalParam |
Returns
| Type |
|---|
| object |
ReadAsync(DataManagerRequest, string)
Performs data Read operation asynchronously.
Declaration
public virtual Task<object> ReadAsync(DataManagerRequest dataManagerRequest, string additionalParam = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManagerRequest | dataManagerRequest | |
| string | additionalParam |
Returns
| Type |
|---|
| Task<object> |
Remove(DataManager, object, string, string)
Performs Remove operation synchronously.
Declaration
public virtual object Remove(DataManager dataManager, object primaryColumnValue, string primaryColumnName, string additionalParam)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | |
| object | primaryColumnValue | |
| string | primaryColumnName | |
| string | additionalParam |
Returns
| Type |
|---|
| object |
RemoveAsync(DataManager, object, string, string)
Performs Remove operation asynchronously..
Declaration
public virtual Task<object> RemoveAsync(DataManager dataManager, object primaryColumnValue, string primaryColumnName, string additionalParam)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | |
| object | primaryColumnValue | |
| string | primaryColumnName | |
| string | additionalParam |
Returns
| Type |
|---|
| Task<object> |
SetParent(BaseComponent)
Sets the parent BaseComponent for the data adaptor.
Declaration
public void SetParent(BaseComponent parent)
Parameters
| Type | Name | Description |
|---|---|---|
| BaseComponent | parent | The parent BaseComponent instance to be associated with this adaptor. |
Update(DataManager, object, string, string)
Updates an existing data item in the data collection.
Declaration
public virtual object Update(DataManager dataManager, object record, string primaryColumnName, string additionalParam)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | The DataManager is a data management component used for performing data operations in applications. |
| object | record | The modified record which is need to be updated. |
| string | primaryColumnName | The primaryColumnName specifies the field name of the primary column. |
| string | additionalParam | An optional parameter that can be used to perform additional data operations. |
Returns
| Type | Description |
|---|---|
| object | Returns the updated data item. |
UpdateAsync(DataManager, object, string, string)
Updates an existing data item in the data collection.
Declaration
public virtual Task<object> UpdateAsync(DataManager dataManager, object record, string primaryColumnName, string additionalParam)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | The DataManager is a data management component used for performing data operations in applications. |
| object | record | The modified record which is need to be updated. |
| string | primaryColumnName | The primaryColumnName specifies the field name of the primary column. |
| string | additionalParam | An optional parameter that can be used to perform additional data operations. |
Returns
| Type | Description |
|---|---|
| Task<object> | Returns the updated data item. |