Class ODataAdaptor
Handles request and response to and from OData service.
Inheritance
System.Object
ODataAdaptor
Assembly: Syncfusion.Blazor.dll
Syntax
public class ODataAdaptor : AdaptorBase, IAdaptor
Constructors
ODataAdaptor(DataManager)
Declaration
public ODataAdaptor(DataManager dataManager)
Parameters
Properties
Options
Declaration
public RemoteOptions Options { get; set; }
Property Value
Type |
Syncfusion.Blazor.Data.RemoteOptions |
ResourceTableName
Declaration
public string ResourceTableName { get; set; }
Property Value
Methods
AddParams(RequestOptions, DataManagerRequest)
Declaration
public override void AddParams(RequestOptions options, DataManagerRequest queries)
Parameters
Overrides
BatchUpdate(DataManager, Object, Object, Object, Utils, String, Nullable<Int32>, Query, Object)
Declaration
public override object BatchUpdate(DataManager dataManager, object changed, object added, object deleted, Utils e, string keyField, Nullable<int> dropIndex, Query query = null, object original = null)
Parameters
Type |
Name |
Description |
DataManager |
dataManager |
|
System.Object |
changed |
|
System.Object |
added |
|
System.Object |
deleted |
|
Utils |
e |
|
System.String |
keyField |
|
System.Nullable<System.Int32> |
dropIndex |
|
Query |
query |
|
System.Object |
original |
|
Returns
Overrides
BeforeSend(HttpRequestMessage)
Declaration
public override void BeforeSend(HttpRequestMessage request)
Parameters
Type |
Name |
Description |
System.Net.Http.HttpRequestMessage |
request |
|
Overrides
CheckDate(String)
Check if given value is a valid date or not.
Declaration
protected static bool CheckDate(string date)
Parameters
Type |
Name |
Description |
System.String |
date |
Input date string.
|
Returns
Type |
Description |
System.Boolean |
bool.
|
GetModelType()
Declaration
public override Type GetModelType()
Returns
Overrides
GetName()
Declaration
public override string GetName()
Returns
Overrides
Insert(DataManager, Object, String, Query, Int32)
Declaration
public override object Insert(DataManager dataManager, object data, string tableName = null, Query query = null, int position = 0)
Parameters
Type |
Name |
Description |
DataManager |
dataManager |
|
System.Object |
data |
|
System.String |
tableName |
|
Query |
query |
|
System.Int32 |
position |
|
Returns
Overrides
IsRemote()
Declaration
public override bool IsRemote()
Returns
Overrides
OnCount(Boolean)
Returns count query string based on query.
Declaration
public virtual string OnCount(bool e)
Parameters
Type |
Name |
Description |
System.Boolean |
e |
Request count value if it is true.
|
Returns
Type |
Description |
System.String |
string.
|
OnDistinct(List<String>)
Returns distinct query string based on query.
Declaration
public virtual string OnDistinct(List<string> distincts)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.String> |
distincts |
List of field names.
|
Returns
Type |
Description |
System.String |
string.
|
OnEachSearch(SearchFilter)
Returns search query string based on query.
Declaration
public virtual void OnEachSearch(SearchFilter e)
Parameters
OnEachSort(DataManagerRequest)
Returns sort query string based on query.
Declaration
public static string OnEachSort(DataManagerRequest queries)
Parameters
Returns
Type |
Description |
System.String |
string.
|
OnExpand(List<String>)
Returns expand query string based on query.
Declaration
public static string OnExpand(List<string> expands)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.String> |
expands |
List of relational table names.
|
Returns
Type |
Description |
System.String |
string.
|
OnExpand(List<String>, List<String>)
Returns expand query string based on query.
Declaration
public virtual string OnExpand(List<string> selects, List<string> expands)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.String> |
selects |
List of fields to select in relational tables.
|
System.Collections.Generic.List<System.String> |
expands |
List of relational table names.
|
Returns
Type |
Description |
System.String |
string.
|
OnPredicate(WhereFilter, DataManagerRequest, Boolean)
Generates request filter query string from the Query value.
Declaration
public virtual string OnPredicate(WhereFilter filter, DataManagerRequest query, bool requiresCast = false)
Parameters
Type |
Name |
Description |
WhereFilter |
filter |
Filter criteria.
|
DataManagerRequest |
query |
Query value.
|
System.Boolean |
requiresCast |
Performs value cast. Applicable on search operation.
|
Returns
OnSearch(List<WhereFilter>)
Returns search query string based on query.
Declaration
public virtual void OnSearch(List<WhereFilter> e)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<WhereFilter> |
e |
List of filter queries.
|
OnSearch(List<WhereFilter>, Object)
Returns search query string based on query.
Declaration
public virtual string OnSearch(List<WhereFilter> e, object additionParams = null)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<WhereFilter> |
e |
List of filter queries.
|
System.Object |
additionParams |
Additional parameters.
|
Returns
Type |
Description |
System.String |
string.
|
OnSelect(List<String>)
Returns select query string based on query.
Declaration
public virtual string OnSelect(List<string> selects)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.String> |
selects |
List of field names to select.
|
Returns
Type |
Description |
System.String |
string.
|
OnTypeCheck(String, String, Type)
Declaration
public static object OnTypeCheck(string value, string field, Type ModelType)
Parameters
Type |
Name |
Description |
System.String |
value |
|
System.String |
field |
|
System.Type |
ModelType |
|
Returns
Declaration
public override Task<object> PerformDataOperation<T>(object queries)
Parameters
Type |
Name |
Description |
System.Object |
queries |
|
Returns
Type |
System.Threading.Tasks.Task<System.Object> |
Type Parameters
Overrides
PreventOdataFilter(Query)
Provides method to customize filter query which can be executed against default filter query.
Declaration
public virtual Query PreventOdataFilter(Query query = null)
Parameters
Type |
Name |
Description |
Query |
query |
|
Returns
ProcessBatchResponse<T>(Object, DataManagerRequest)
Declaration
public override Task<object> ProcessBatchResponse<T>(object data, DataManagerRequest queries)
Parameters
Returns
Type |
System.Threading.Tasks.Task<System.Object> |
Type Parameters
Overrides
ProcessCrudResponse<T>(Object, DataManagerRequest)
Declaration
public override Task<object> ProcessCrudResponse<T>(object data, DataManagerRequest queries)
Parameters
Returns
Type |
System.Threading.Tasks.Task<System.Object> |
Type Parameters
Overrides
ProcessQuery(DataManagerRequest)
Declaration
public override object ProcessQuery(DataManagerRequest queries)
Parameters
Returns
Overrides
ProcessResponse<T>(Object, DataManagerRequest)
Declaration
public override Task<object> ProcessResponse<T>(object data, DataManagerRequest queries)
Parameters
Returns
Type |
System.Threading.Tasks.Task<System.Object> |
Type Parameters
Overrides
Remove(DataManager, String, Object, String, Query)
Declaration
public override object Remove(DataManager dataManager, string keyField, object value, string tableName = null, Query query = null)
Parameters
Type |
Name |
Description |
DataManager |
dataManager |
|
System.String |
keyField |
|
System.Object |
value |
|
System.String |
tableName |
|
Query |
query |
|
Returns
Overrides
SetModelType(Type)
Declaration
public override void SetModelType(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Overrides
Update(DataManager, String, Object, String, Query, Object, IDictionary<String, Object>)
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 |
|
System.String |
keyField |
|
System.Object |
data |
|
System.String |
tableName |
|
Query |
query |
|
System.Object |
original |
|
System.Collections.Generic.IDictionary<System.String, System.Object> |
updateProperties |
|
Returns
Overrides