Class ODataV4Adaptor
Handles request and response to and from ODataV4 service.
Inherited Members
Namespace: Syncfusion.Blazor.Data
Assembly: Syncfusion.Blazor.dll
Syntax
public class ODataV4Adaptor : ODataAdaptor
Constructors
ODataV4Adaptor(DataManager)
Initializes a new instance of the ODataV4Adaptor with default remote options.
Declaration
public ODataV4Adaptor(DataManager dataManager)
Parameters
| Type | Name | Description |
|---|---|---|
| DataManager | dataManager |
Methods
BeforeSend(HttpRequestMessage)
Adds required headers before sending the HTTP request.
Declaration
public override void BeforeSend(HttpRequestMessage request)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestMessage | request | HTTP request message to modify. |
Overrides
GetName()
Gets the adaptor name.
Declaration
public override string GetName()
Returns
| Type | Description |
|---|---|
| string | The adaptor name. |
Overrides
IsRemote()
Indicates whether the adaptor performs remote operations.
Declaration
public override bool IsRemote()
Returns
| Type | Description |
|---|---|
| bool | Always returns true. |
Overrides
OnCount(bool)
Returns the OData $count query parameter value.
Declaration
public override string OnCount(bool e)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | e | Indicates whether the count should be requested. |
Returns
| Type | Description |
|---|---|
| string | A string representing the $count parameter value ("true" or empty). |
Overrides
OnDistinct(List<string>)
Builds the OData distinct query string from the given fields.
Declaration
public override string OnDistinct(List<string> distincts)
Parameters
| Type | Name | Description |
|---|---|---|
| List<string> | distincts | List of fields for distinct grouping. |
Returns
| Type | Description |
|---|---|
| string | A string representing the OData $apply groupby query. |
Overrides
OnDistinct(string[])
Returns a placeholder object for distinct fields processing.
Declaration
public static object OnDistinct(string[] distinctFields)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | distinctFields | Array of distinct field names. |
Returns
| Type | Description |
|---|---|
| object | An empty object placeholder for distinct processing. |
OnEachSearch(SearchFilter)
Adds the search key to the internal search collection.
Declaration
public override void OnEachSearch(SearchFilter e)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchFilter | e | Search filter containing the key to add. |
Overrides
OnExpand(List<string>, List<string>)
Builds the OData expand query string based on selected and expanded fields.
Declaration
public override string OnExpand(List<string> selects, List<string> expands)
Parameters
| Type | Name | Description |
|---|---|---|
| List<string> | selects | List of selected fields. |
| List<string> | expands | List of expanded fields. |
Returns
| Type | Description |
|---|---|
| string | A string representing the OData $expand query. |
Overrides
OnPredicate(WhereFilter, DataManagerRequest, bool)
Builds an OData predicate string for the given filter.
Declaration
public override string OnPredicate(WhereFilter filter, DataManagerRequest query, bool requiresCast = false)
Parameters
| Type | Name | Description |
|---|---|---|
| WhereFilter | filter | Filter to convert into an OData predicate. |
| DataManagerRequest | query | DataManager request containing formatting and aggregate context. |
| bool | requiresCast | Indicates whether type casting is required in the predicate. |
Returns
| Type | Description |
|---|---|
| string | A string representing the constructed OData predicate. |
Overrides
OnSearch(List<WhereFilter>)
Combines all search keys into a single search query.
Declaration
public override void OnSearch(List<WhereFilter> e)
Parameters
| Type | Name | Description |
|---|---|---|
| List<WhereFilter> | e | List of filters used for searching. |
Overrides
OnSelect(List<string>)
Builds the OData select query string from the given fields.
Declaration
public override string OnSelect(List<string> selects)
Parameters
| Type | Name | Description |
|---|---|---|
| List<string> | selects | List of fields to select. |
Returns
| Type | Description |
|---|---|
| string | A string representing the OData $select query. |
Overrides
ProcessCrudResponse<T>(object, DataManagerRequest)
Processes a CRUD HTTP response and returns the deserialized entity.
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 (not used for deserialization). |
Returns
| Type |
|---|
| Task<object> |
Type Parameters
| Name |
|---|
| T |
Overrides
Remarks
Reads the response content and deserializes it to the specified type.
ProcessResponse<T>(object, DataManagerRequest)
Processes an OData V4 HTTP response and returns data or aggregated result.
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 | DataManagerRequest containing query parameters. |
Returns
| Type |
|---|
| Task<object> |
Type Parameters
| Name |
|---|
| T |
Overrides
Remarks
Parses the response, sets context info, applies aggregates and grouping when requested.