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)
Initializes a new instance of the UrlAdaptor class.
Declaration
public UrlAdaptor(DataManager dataManager)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager |
Methods
BatchUpdate(DataManager, object, object, object, Utils, string, int?, Query, object)
Creates request options for batch update operations.
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 used for configuration. |
| object | changed | Collection of modified entities. |
| object | added | Collection of newly added entities. |
| object | deleted | Collection of entities to delete. |
| Utils | e | Utility object containing URL and key information. |
| string | keyField | Key field name identifying entities. |
| int? | dropIndex | Index related to drag-and-drop operations. |
| Query | query | Query context and parameters.This parameter is optional. |
| object | original | Original data context for comparison.This parameter is optional. |
Returns
| Type | Description |
|---|---|
| object | A RequestOptions object configured for batch update. |
Overrides
GetName()
Gets the adaptor name.
Declaration
public override string GetName()
Returns
| Type | Description |
|---|---|
| string | The adaptor name. |
Overrides
Insert(DataManager, object, string, Query, int)
Creates request options for inserting data.
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 used for configuration. |
| object | data | Data entity to insert. |
| string | tableName | Target table name for the insert operation.This parameter is optional. |
| Query | query | Query context and parameters.This parameter is optional. |
| int | position | Position for insertion.This parameter is optional. |
Returns
| Type | Description |
|---|---|
| object | A RequestOptions object configured for insert. |
Overrides
IsRemote()
Indicates whether the adaptor performs remote operations.
Declaration
public override bool IsRemote()
Returns
| Type | Description |
|---|---|
| bool | Always returns true. |
Overrides
PerformDataOperation<T>(object)
Sends the HTTP request and returns the response message .
Declaration
public override Task<object> PerformDataOperation<T>(object queries)
Parameters
| Type | Name | Description |
|---|---|---|
| object | queries | DataManagerRequest containing query parameters. |
Returns
| Type | Description |
|---|---|
| Task<object> | The HTTP response message as an object. |
Type Parameters
| Name |
|---|
| T |
Overrides
ProcessCrudResponse<T>(object, DataManagerRequest)
Processes the CRUD response and returns the deserialized result.
Declaration
public override Task<object> ProcessCrudResponse<T>(object data, DataManagerRequest queries)
Parameters
| Type | Name | Description |
|---|---|---|
| object | data | Raw HTTP response object to process. |
| DataManagerRequest | queries | DataManager request context. |
Returns
| Type | Description |
|---|---|
| Task<object> | The deserialized entity of type T or an empty object. |
Type Parameters
| Name |
|---|
| T |
Overrides
ProcessQuery(DataManagerRequest)
Creates request options for processing the query.
Declaration
public override object ProcessQuery(DataManagerRequest queries)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManagerRequest | queries | DataManager request containing query details. |
Returns
| Type | Description |
|---|---|
| object | A RequestOptions object configured for the operation. |
Overrides
ProcessResponse<T>(object, DataManagerRequest)
Processes the response from the server and returns the result or aggregated data.
Declaration
public override Task<object> ProcessResponse<T>(object data, DataManagerRequest queries)
Parameters
| Type | Name | Description |
|---|---|---|
| object | data | Raw HTTP response object to process. |
| DataManagerRequest | queries | DataManager request containing query details. |
Returns
| Type | Description |
|---|---|
| Task<object> | An object containing the result list or a DataResult with counts and aggregates. |
Type Parameters
| Name |
|---|
| T |
Overrides
Remove(DataManager, string, object, string, Query)
Creates request options for removing data.
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 used for configuration. |
| string | keyField | Key field name identifying the entity. |
| object | value | Key value of the entity to remove. |
| string | tableName | Target table name for the remove operation.This parameter is optional. |
| Query | query | Query context and parameters.This parameter is optional. |
Returns
| Type | Description |
|---|---|
| object | A RequestOptions object configured for remove. |
Overrides
Update(DataManager, string, object, string, Query, object, IDictionary<string, object>)
Creates request options for updating data.
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 used for configuration. |
| string | keyField | Key field name identifying the entity. |
| object | data | Data entity with updated values. |
| string | tableName | Target table name for the update operation.This parameter is optional. |
| Query | query | Query context and parameters.This parameter is optional. |
| object | original | Original entity before updates.This parameter is optional. |
| IDictionary<string, object> | updateProperties | Properties and values to update.This parameter is optional. |
Returns
| Type | Description |
|---|---|
| object | A RequestOptions object configured for update. |