Class UrlAdaptor
Handles request and response to and from any remote service.
Inherited Members
Namespace: Syncfusion.Blazor.Data
Assembly: Syncfusion.Blazor.dll
Syntax
public class UrlAdaptor : AdaptorBase
Constructors
UrlAdaptor(DataManager)
Declaration
public UrlAdaptor(DataManager dataManager)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager |
Methods
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
GetName()
Returns the adaptor name.
Declaration
public override string GetName()
Returns
| Type | Description |
|---|---|
| string | string. |
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
IsRemote()
Returns true if data source is remote service.
Declaration
public override bool IsRemote()
Returns
| Type | Description |
|---|---|
| bool | bool. |
Overrides
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
ProcessCrudResponse<T>(object, DataManagerRequest)
Process the CRUD operation response/result from the data source and make it understandable by user end.
Declaration
public override Task<object> ProcessCrudResponse<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
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
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. |