Interface IDataModel<TModel>
Defines the very basic interface for every Domain Model object. Add methods are implemented in their respective model interfaces
public interface IDataModel<TModel> : IDataModelParent, IDataModelWithContext, ISupportModules<TModel>
Type Parameters
TModelThe actual type of the Domain Model object
- Inherited Members
- Extension Methods
Properties
Requested
Defines whether this model object was requested from the back-end
bool Requested { get; set; }
Property Value
Methods
ArePropertiesAvailable(params Expression<Func<TModel, object>>[])
Checks if the needed properties were loaded or not
bool ArePropertiesAvailable(params Expression<Func<TModel, object>>[] expressions)
Parameters
expressionsExpression<Func<TModel, object>>[]Expression listing the properties to check
Returns
- bool
True if properties were loaded, false otherwise
EnsureProperties(params Expression<Func<TModel, object>>[])
Checks if the requested properties are loaded for the given model, if not they're loaded right now
void EnsureProperties(params Expression<Func<TModel, object>>[] expressions)
Parameters
expressionsExpression<Func<TModel, object>>[]Expressions listing the properties to load
EnsurePropertiesAsync(params Expression<Func<TModel, object>>[])
Checks if the requested properties are loaded for the given model, if not they're loaded via a GetAsync call
Task EnsurePropertiesAsync(params Expression<Func<TModel, object>>[] expressions)
Parameters
expressionsExpression<Func<TModel, object>>[]Expressions listing the properties to load
Returns
ExecuteRequest(ApiRequest)
Executes a given API call
ApiRequestResponse ExecuteRequest(ApiRequest request)
Parameters
requestApiRequestAPI call to execute
Returns
- ApiRequestResponse
The response of the API call
ExecuteRequestAsync(ApiRequest)
Executes a given API call
Task<ApiRequestResponse> ExecuteRequestAsync(ApiRequest request)
Parameters
requestApiRequestAPI call to execute
Returns
- Task<ApiRequestResponse>
The response of the API call
ExecuteRequestBatch(ApiRequest)
Executes a given API call
IBatchSingleResult<BatchResultValue<string>> ExecuteRequestBatch(ApiRequest request)
Parameters
requestApiRequestAPI call to execute
Returns
- IBatchSingleResult<BatchResultValue<string>>
The response of the API call
ExecuteRequestBatch(Batch, ApiRequest)
Executes a given API call
IBatchSingleResult<BatchResultValue<string>> ExecuteRequestBatch(Batch batch, ApiRequest request)
Parameters
batchBatchrequestApiRequestAPI call to execute
Returns
- IBatchSingleResult<BatchResultValue<string>>
The response of the API call
ExecuteRequestBatchAsync(ApiRequest)
Executes a given API call
Task<IBatchSingleResult<BatchResultValue<string>>> ExecuteRequestBatchAsync(ApiRequest request)
Parameters
requestApiRequestAPI call to execute
Returns
- Task<IBatchSingleResult<BatchResultValue<string>>>
The response of the API call
ExecuteRequestBatchAsync(Batch, ApiRequest)
Executes a given API call
Task<IBatchSingleResult<BatchResultValue<string>>> ExecuteRequestBatchAsync(Batch batch, ApiRequest request)
Parameters
batchBatchrequestApiRequestAPI call to execute
Returns
- Task<IBatchSingleResult<BatchResultValue<string>>>
The response of the API call
HasChanged(string)
Checks if a property on this model object has changed
bool HasChanged(string propertyName = "")
Parameters
propertyNamestringProperty to check
Returns
- bool
True if changed, false otherwise
HasValue(string)
Checks if a property on this model object has a value set
bool HasValue(string propertyName = "")
Parameters
propertyNamestringProperty to check
Returns
- bool
True if set, false otherwise
IsPropertyAvailable(Expression<Func<TModel, object>>)
Checks if a property is loaded or not
bool IsPropertyAvailable(Expression<Func<TModel, object>> expression)
Parameters
expressionExpression<Func<TModel, object>>Expression listing the property to load
Returns
- bool
True if property was loaded, false otherwise