Class DataAdaptor<T>
Abstract class for Data adaptors.
Inheritance
Implements
Namespace: Syncfusion.Blazor
Assembly: Syncfusion.Blazor.dll
Syntax
public abstract class DataAdaptor<T> : OwningComponentBase<T>, IDataAdaptor
Type Parameters
Name |
---|
T |
Remarks
Extend DataAdaptor{T} component while creating custom adaptor component. DataAdaptor{T} component is extended from Microsoft.AspNetCore.Components.OwningComponentBase`1 so that services can be accessed from Microsoft.AspNetCore.Components.OwningComponentBase`1.Service property.
Constructors
DataAdaptor()
Declaration
protected DataAdaptor()
Methods
BatchUpdate(DataManager, Object, Object, Object, String, String, Nullable<Int32>)
Performs Batch CRUD operations synchronously.
Declaration
public virtual object BatchUpdate(DataManager dataManager, object changedRecords, object addedRecords, object deletedRecords, string primaryColumnName, string key, Nullable<int> dropIndex)
Parameters
Type | Name | Description |
---|---|---|
DataManager | dataManager | |
System.Object | changedRecords | |
System.Object | addedRecords | |
System.Object | deletedRecords | |
System.String | primaryColumnName | |
System.String | key | |
System.Nullable<System.Int32> | dropIndex |
Returns
Type |
---|
System.Object |
BatchUpdateAsync(DataManager, Object, Object, Object, String, String, Nullable<Int32>)
Performs Batch CRUD operations asynchronously.
Declaration
public virtual Task<object> BatchUpdateAsync(DataManager dataManager, object changedRecords, object addedRecords, object deletedRecords, string primaryColumnName, string key, Nullable<int> dropIndex)
Parameters
Type | Name | Description |
---|---|---|
DataManager | dataManager | |
System.Object | changedRecords | |
System.Object | addedRecords | |
System.Object | deletedRecords | |
System.String | primaryColumnName | |
System.String | key | |
System.Nullable<System.Int32> | dropIndex |
Returns
Type |
---|
System.Threading.Tasks.Task<System.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. |
System.Object | record | The new record which is need to be inserted. |
System.String | additionalParam | An optional parameter that can be used to perform additional data operations. |
Returns
Type | Description |
---|---|
System.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. |
System.Object | record | The new record which is need to be inserted. |
System.String | additionalParam | An optional parameter that can be used to perform additional data operations. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | Returns the newly inserted record details. |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |
Read(DataManagerRequest, String)
Performs data Read operation synchronously.
Declaration
public virtual object Read(DataManagerRequest dataManagerRequest, string additionalParam = null)
Parameters
Type | Name | Description |
---|---|---|
DataManagerRequest | dataManagerRequest | |
System.String | additionalParam |
Returns
Type |
---|
System.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 | |
System.String | additionalParam |
Returns
Type |
---|
System.Threading.Tasks.Task<System.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 | |
System.Object | primaryColumnValue | |
System.String | primaryColumnName | |
System.String | additionalParam |
Returns
Type |
---|
System.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 | |
System.Object | primaryColumnValue | |
System.String | primaryColumnName | |
System.String | additionalParam |
Returns
Type |
---|
System.Threading.Tasks.Task<System.Object> |
SetParent(BaseComponent)
Declaration
public void SetParent(BaseComponent parent)
Parameters
Type | Name | Description |
---|---|---|
BaseComponent | parent |
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. |
System.Object | record | The modified record which is need to be updated. |
System.String | primaryColumnName | The primaryColumnName specifies the field name of the primary column. |
System.String | additionalParam | An optional parameter that can be used to perform additional data operations. |
Returns
Type | Description |
---|---|
System.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. |
System.Object | record | The modified record which is need to be updated. |
System.String | primaryColumnName | The primaryColumnName specifies the field name of the primary column. |
System.String | additionalParam | An optional parameter that can be used to perform additional data operations. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | Returns the updated data item. |