Class ApiAdaptor
Handles request and response to and from Web API created for ApiController.
Inherited Members
Namespace: Syncfusion.Blazor.Data
Assembly: Syncfusion.Blazor.dll
Syntax
public class ApiAdaptor : UrlAdaptor
Constructors
ApiAdaptor(DataManager)
Initializes a new instance of the ApiAdaptor class with the specified DataManager.
Declaration
public ApiAdaptor(DataManager dataManager)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager |
Methods
AddParams(RequestOptions, DataManagerRequest)
Adds query parameters from the DataManagerRequest to the specified RequestOptions.
Declaration
public override void AddParams(RequestOptions options, DataManagerRequest queries)
Parameters
| Type | Name | Description |
|---|---|---|
| RequestOptions | options | RequestOptions object to update. |
| DataManagerRequest | queries | DataManagerRequest containing query parameters. |
Overrides
Remarks
Appends query parameters to the request URL and validates that RequestOptions is not null.
GetName()
Gets the adaptor name.
Declaration
public override string GetName()
Returns
| Type | Description |
|---|---|
| string | The adaptor name. |
Overrides
ProcessQuery(DataManagerRequest)
Processes the data request and returns API options.
Declaration
public override object ProcessQuery(DataManagerRequest queries)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManagerRequest | queries | The data manager request. |
Returns
| Type | Description |
|---|---|
| object | The API request options. |
Overrides
Remove(DataManager, string, object, string, Query)
Removes a record from the data source using the specified key field and value.
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.This parameter is optional. |
| Query | query | Query context and parameters.This parameter is optional. |
Returns
| Type | Description |
|---|---|
| object | Returns the configured request options for the remove operation. |
Overrides
Update(DataManager, string, object, string, Query, object, IDictionary<string, object>)
Updates a record in the data source using the specified key and 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.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 | Returns the configured request options for the update operation. |