Class BlazorAdaptor
Handles data operation in IEnumerable data source.
Inherited Members
Namespace: Syncfusion.Blazor.Data
Assembly: Syncfusion.Blazor.dll
Syntax
public class BlazorAdaptor : AdaptorBase
Constructors
BlazorAdaptor(DataManager)
Declaration
public BlazorAdaptor(DataManager dataManager)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager |
Methods
BatchUpdate(DataManager, List<IDynamicMetaObjectProvider>, List<IDynamicMetaObjectProvider>, List<IDynamicMetaObjectProvider>, Utils, string, int?, Query, object)
Handles the batch update operation for Dynamic objects. Enables user to perform add, update and remove items from data source in a single request.
Declaration
public override object BatchUpdate(DataManager dataManager, List<IDynamicMetaObjectProvider> changed, List<IDynamicMetaObjectProvider> added, List<IDynamicMetaObjectProvider> deleted, Utils e, string keyField, int? dropIndex, Query query = null, object original = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | DataManager instance. |
| List<IDynamicMetaObjectProvider> | changed | Specifies the changed records. |
| List<IDynamicMetaObjectProvider> | added | Specifies the added records. |
| List<IDynamicMetaObjectProvider> | deleted | Specifies the deleted records. |
| Utils | e | Specifies the url and its key. |
| string | keyField | Specifies the primary key field. |
| int? | dropIndex | Specifies the record position, from which new records will be added. |
| Query | query | Query class instance. |
| object | original | Specifies the original data. Uses this original data for sending change items alone to the server. |
Returns
| Type | Description |
|---|---|
| object | object. |
Overrides
BatchUpdate(DataManager, object, object, object, Utils, string, int?, Query, object)
Handles the batch update operation. Enables user to perform add, update and remove items from data source in a single request.
Declaration
public override object BatchUpdate(DataManager dataManager, object changed, object added, object deleted, Utils e, string keyField, int? dropIndex, Query query = null, object original = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | DataManager instance. |
| object | changed | Specifies the changed records. |
| object | added | Specifies the added records. |
| object | deleted | Specifies the deleted records. |
| Utils | e | Specifies the url and its key. |
| string | keyField | Specifies the primary key field. |
| int? | dropIndex | Specifies the record position, from which new records will be added. |
| Query | query | Query class instance. |
| object | original | Specifies the original data. Uses this original data for sending change items alone to the server. |
Returns
| Type | Description |
|---|---|
| object | object. |
Overrides
BatchUpdateArray<T>(DataManager, object, object, object, string, int?)
Declaration
public static object BatchUpdateArray<T>(DataManager dataManager, object changed, object added, object deleted, string keyField, int? dropIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | |
| object | changed | |
| object | added | |
| object | deleted | |
| string | keyField | |
| int? | dropIndex |
Returns
| Type |
|---|
| object |
Type Parameters
| Name |
|---|
| T |
CollectChildRecords(IEnumerable, DataManagerRequest)
Performs data operation on child records.
Declaration
public static IEnumerable CollectChildRecords(IEnumerable datasource, DataManagerRequest dm)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable | datasource | Data source value. |
| DataManagerRequest | dm | Query to be processed. |
Returns
| Type | Description |
|---|---|
| IEnumerable | IEnumerable. |
DataOperationInvoke<T>(IEnumerable, DataManagerRequest)
Performs data operation.
Declaration
public static DataResult DataOperationInvoke<T>(IEnumerable dataSource, DataManagerRequest queries)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable | dataSource | Data source value. |
| DataManagerRequest | queries | Query to be processed. |
Returns
| Type | Description |
|---|---|
| DataResult | DataResult. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the data source item. |
GetName()
Returns the adaptor name.
Declaration
public override string GetName()
Returns
| Type | Description |
|---|---|
| string | string. |
Overrides
GroupResult<T>(DataManagerRequest, IEnumerable, DataResult)
Declaration
public static DataResult GroupResult<T>(DataManagerRequest queries, IEnumerable DataSource, DataResult DataObject)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManagerRequest | queries | |
| IEnumerable | DataSource | |
| DataResult | DataObject |
Returns
| Type |
|---|
| DataResult |
Type Parameters
| Name |
|---|
| T |
Insert(DataManager, IDynamicMetaObjectProvider, string, Query, int)
Handles the new item add operation in dynamic objects.
Declaration
public override object Insert(DataManager dataManager, IDynamicMetaObjectProvider data, string tableName = null, Query query = null, int position = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | DataManager instance. |
| IDynamicMetaObjectProvider | data | New item to be added. |
| string | tableName | Table name to insert new item. |
| Query | query | Query class instance. |
| int | position | Position to insert the new item. |
Returns
| Type | Description |
|---|---|
| object | object. |
Overrides
Insert(DataManager, object, string, Query, int)
Handles the new item add operation.
Declaration
public override object Insert(DataManager dataManager, object data, string tableName = null, Query query = null, int position = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | DataManager instance. |
| object | data | New item to be added. |
| string | tableName | Table name to insert new item. |
| Query | query | Query class instance. |
| int | position | Position to insert the new item. |
Returns
| Type | Description |
|---|---|
| object | object. |
Overrides
InsertArray<T>(DataManager, object, int)
Declaration
public static object InsertArray<T>(DataManager dataManager, object data, int position)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | |
| object | data | |
| int | position |
Returns
| Type |
|---|
| object |
Type Parameters
| Name |
|---|
| T |
PerformDataOperation<T>(object)
Performs data operation. If its a remote data source then make a server request.
Declaration
public override Task<object> PerformDataOperation<T>(object queries)
Parameters
| Type | Name | Description |
|---|---|---|
| object | queries | Specifies the query. |
Returns
| Type | Description |
|---|---|
| Task<object> | Task. |
Type Parameters
| Name | Description |
|---|---|
| T | Specifies the data source model type. |
Overrides
ProcessQuery(DataManagerRequest)
Read query from Query and make it understandable by data source.
Declaration
public override object ProcessQuery(DataManagerRequest queries)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManagerRequest | queries | Specifies the query. |
Returns
| Type | Description |
|---|---|
| object | object. |
Overrides
ProcessResponse<T>(object, DataManagerRequest)
Process the data operation response/result from the data source and make it understandable by user end.
Declaration
public override Task<object> ProcessResponse<T>(object data, DataManagerRequest queries)
Parameters
| Type | Name | Description |
|---|---|---|
| object | data | Specifies the data manager instance. |
| DataManagerRequest | queries | Specifies the query. |
Returns
| Type | Description |
|---|---|
| Task<object> | Task. |
Type Parameters
| Name | Description |
|---|---|
| T | Specifies the data source model type. |
Overrides
Remove(DataManager, string, object, string, Query)
Handles the remove operation.
Declaration
public override object Remove(DataManager dataManager, string keyField, object value, string tableName = null, Query query = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | DataManager instance. |
| string | keyField | Specifies the primary key. |
| object | value | Specifies the primary key field value. |
| string | tableName | Table name of the update item. |
| Query | query | Query instance. |
Returns
| Type | Description |
|---|---|
| object | object. |
Overrides
RemoveArray<T>(DataManager, string, object)
Declaration
public static object RemoveArray<T>(DataManager dataManager, string keyField, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | |
| string | keyField | |
| object | value |
Returns
| Type |
|---|
| object |
Type Parameters
| Name |
|---|
| T |
SetRunSyncOnce(bool)
Runs the data operation synchronously.
Declaration
public override void SetRunSyncOnce(bool runSync)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | runSync | Enables synchronous data operation. |
Overrides
Update(DataManager, string, IDynamicMetaObjectProvider, string, Query, object)
Handles the item update operation.
Declaration
public override object Update(DataManager dataManager, string keyField, IDynamicMetaObjectProvider data, string tableName = null, Query query = null, object original = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | DataManager instance. |
| string | keyField | Specifies the primary key. |
| IDynamicMetaObjectProvider | data | Specifies the updated record. |
| string | tableName | Table name of the update item. |
| Query | query | Query instance. |
| object | original | Specifies the original data. Uses this original data for sending change items alone to the server. |
Returns
| Type | Description |
|---|---|
| object | object. |
Overrides
Update(DataManager, string, object, string, Query, object, IDictionary<string, object>)
Handles the item update operation.
Declaration
public override object Update(DataManager dataManager, string keyField, object data, string tableName = null, Query query = null, object original = null, IDictionary<string, object> updateProperties = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager | DataManager instance. |
| string | keyField | Specifies the primary key. |
| object | data | Specifies the updated record. |
| string | tableName | Table name of the update item. |
| Query | query | Query instance. |
| object | original | Specifies the original data. Uses this original data for sending change items alone to the server. |
| IDictionary<string, object> | updateProperties | Specifies the field names to be updated. |
Returns
| Type | Description |
|---|---|
| object | object. |