Class DataContext
Represents the class that manages access to meta data.
Inherited Members
Namespace: TimeCockpit.Data
Assembly: TimeCockpit.Data.dll
Syntax
public sealed class DataContext : DynamicObject, IDynamicMetaObjectProvider, IDataContext, IDisposable
Remarks
The Data
Properties
DataContextType
Gets the Data
Declaration
public DataContextType DataContextType { get; }
Property Value
Type | Description |
---|---|
Data |
Remarks
The type of the data context may either be Data
DbClient
Gets the reference to the underlying Db
Declaration
public DbClient DbClient { get; }
Property Value
Type | Description |
---|---|
Db |
Remarks
The Db
Exceptions
Type | Condition |
---|---|
System. |
Thrown if it is tried to set the property to null. |
Environment
Gets the environment for the current instance of Data
Declaration
public Environment Environment { get; }
Property Value
Type | Description |
---|---|
Environment |
Implements
Localizer
Gets the localization implementation that is used.
Declaration
public NameLocalizer Localizer { get; }
Property Value
Type | Description |
---|---|
Name |
Model
Gets the Model associated with this context.
Declaration
public Model Model { get; }
Property Value
Type | Description |
---|---|
Model |
Remarks
The Model of an instance of a Data
Methods
Create(String, String)
Creates a new instance of the Data
Declaration
public static DataContext Create(string userName, string password)
Parameters
Type | Name | Description |
---|---|---|
System. |
userName | The username to access the management webservice. |
System. |
password | The password to access the management webservice. |
Returns
Type | Description |
---|---|
Data |
New instance of the Data |
Remarks
This method fetches an instance of Web
Exceptions
Type | Condition |
---|---|
System. |
Create(String, String, String)
Creates a new instance of the Data
Declaration
public static DataContext Create(string userName, string password, string endpointName)
Parameters
Type | Name | Description |
---|---|---|
System. |
userName | The username to access the management webservice. |
System. |
password | The password to access the management webservice. |
System. |
endpointName | The name of the service endpoint where to access the management service. |
Returns
Type | Description |
---|---|
Data |
New instance of the Data |
Remarks
This method fetches an instance of Web
Exceptions
Type | Condition |
---|---|
System. |
Create(String, String, String, String)
Creates a new instance of the Data
Declaration
public static DataContext Create(string userName, string password, string endpointName, string endpointAddress)
Parameters
Type | Name | Description |
---|---|---|
System. |
userName | The username to access the management webservice. |
System. |
password | The password to access the management webservice. |
System. |
endpointName | The name of the service endpoint where to access the management service. |
System. |
endpointAddress | The address of the endpoint. |
Returns
Type | Description |
---|---|
Data |
New instance of the Data |
Remarks
This method fetches an instance of Web
Exceptions
Type | Condition |
---|---|
System. |
Create(String, String, String, DataContextSettings, String)
Creates a new instance of the Data
Declaration
public static DataContext Create(string userName, string password, string endpointName, DataContextSettings settings, string endpointAddress = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
userName | The username to access the management webservice. |
System. |
password | The password to access the management webservice. |
System. |
endpointName | The name of the service endpoint where to access the management service. |
Data |
settings | Settings that define the behavior of the created Data |
System. |
endpointAddress | The address of the endpoint. |
Returns
Type | Description |
---|---|
Data |
New instance of the Data |
Remarks
This method fetches an instance of Web
ATTENTION: If either a provider name, connection string, a blob storage account name, a shared access key or a tenant schema was set in the
settings.DbClientSettings parameter, the latter settings will overwritten with the data fetched from the management service. Further it creates
a Data
Exceptions
Type | Condition |
---|---|
System. |
Create(DataContextSettings)
Creates a new instance of the Data
Declaration
public static DataContext Create(DataContextSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Data |
settings | Settings that define the behavior of the created Data |
Returns
Type | Description |
---|---|
Data |
New instance of the Data |
Remarks
This method to create a new instance of Data
This factory methods creates the Db
Further, if Install
Exceptions
Type | Condition |
---|---|
System. |
DeleteObject(EntityObject)
Deletes a given Entity
Declaration
public void DeleteObject(EntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The Entity |
Remarks
This method marks the instance Entity
DeleteObjectAsync(EntityObject)
Deletes a given Entity
Declaration
[Obsolete("Avoid until task based implementation becomes available.")]
public IObservable<Unit> DeleteObjectAsync(EntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The Entity |
Returns
Type | Description |
---|---|
System. |
A instance of IConnectableObservable |
DisableAuditTrail()
Disables the audit trail functionality for the current data context.
Declaration
public void DisableAuditTrail()
DisableSystemMode()
Sets the Model of a Data
Declaration
public void DisableSystemMode()
Dispose()
Releases database connection.
Declaration
public void Dispose()
Implements
EnableAuditTrail()
Enables the audit trail functionality for the current data context.
Declaration
public void EnableAuditTrail()
EnableSystemMode()
Sets the Model of a Data
Declaration
public void EnableSystemMode()
Remarks
ATTENTION: Use the system model at your own risk and only if you know what you are doing! Changes to System or Application
EnforceRefreshModel()
Refreshes Model by reading it from the underlying metadata database
Declaration
public void EnforceRefreshModel()
Remarks
In contrast to Refresh
ExecuteAction(ModelAction, ExecutionContext)
Execute the given action.
Declaration
public ActionResult ExecuteAction(ModelAction action, ExecutionContext executionContext)
Parameters
Type | Name | Description |
---|---|---|
Model |
action | Action to execute. |
Execution |
executionContext | Execution context/parameters to use. |
Returns
Type | Description |
---|---|
Action |
Action result. |
Implements
GetMember(String)
Gets a dynamic member.
Declaration
public override object GetMember(string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | Name of the member or method to get. |
Returns
Type | Description |
---|---|
System. |
Reference to the dynamic member. |
Overrides
Remarks
In most cases this method is used in dynamic language code.
In a dynamic language, Get
Select methods that should be called with a list of parameters must end with the "WithParams" prfix in a dynamic language. So to call SelectSingle(String, IEnumerable<QueryParameter>, SelectCache) from a script the correct statement is SelectSingleWithParams(query, params).
In order to create new instance of Entity
GetMetaObject(Expression)
Gets the data context meta object.
Declaration
public override DynamicMetaObject GetMetaObject(Expression parameter)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameter | Expression parameter. |
Returns
Type | Description |
---|---|
System. |
Meta object. |
Overrides
GetScriptListResultAsync(ScriptListRequest)
Gets the result of a script source list.
Declaration
public Task<EntityObject[]> GetScriptListResultAsync(ScriptListRequest request)
Parameters
Type | Name | Description |
---|---|---|
Script |
request | Request: List name, parameters ... |
Returns
Type | Description |
---|---|
System. |
Returns the task representing the operation and containing the result entity objects. |
Implements
GetScriptResultByListName(String, String, IEnumerable<QueryParameter>, String)
Selects the name of the by list.
Declaration
public ICollection<EntityObject> GetScriptResultByListName(string listName, string methodName, IEnumerable<QueryParameter> queryParameters, string condition = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
listName | Name of the list. |
System. |
methodName | Name of the method. |
System. |
queryParameters | The query parameters. |
System. |
condition | Additional query condition. |
Returns
Type | Description |
---|---|
System. |
A list of Entity |
GetScriptResultModelEntityByListName(String, String)
Gets the result model entity for the specified list.
Declaration
public ModelEntityBase GetScriptResultModelEntityByListName(string listName, string methodName)
Parameters
Type | Name | Description |
---|---|---|
System. |
listName | Name of the list. |
System. |
methodName | Name of the method. |
Returns
Type | Description |
---|---|
Model |
A list of Entity |
GetSettings(ConnectionInformation, DataContextSettings)
TODO review/preview
Declaration
public static DataContextSettings GetSettings(ConnectionInformation connectionInformation, DataContextSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Web |
connectionInformation | |
Data |
settings |
Returns
Type | Description |
---|---|
Data |
GetVersionInformation(String, String, String, String)
Gets the version information for the current user/tenant.
Declaration
public static VersionInformationOverview GetVersionInformation(string userName, string password, string endpointName, string endpointAddress = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
userName | The username to access the management webservice. |
System. |
password | The password to access the management webservice. |
System. |
endpointName | The name of the service endpoint where to access the management service. |
System. |
endpointAddress | The address of the endpoint to use. |
Returns
Type | Description |
---|---|
Web |
The version information for the current user/tenant or null if the user uses a deprecated (pre-ownership) tenant. |
GetWritableModel()
Gets a Model from the metadata repository database that is not frozen (i.e. that can be changed)
Declaration
public Model GetWritableModel()
Returns
Exceptions
Type | Condition |
---|---|
System. |
InitializeLocalizedTextValues(EntityObject)
Initializes the localized text values.
Declaration
public void InitializeLocalizedTextValues(EntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The entity object to initialize the localized text value collection for. |
Remarks
If called, the method creates the structure to store localized text values of a new entity object.
If the method is called on an Entity
IsDirty(EntityObject)
Checks if an Entity
Declaration
public bool IsDirty(EntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The Entity |
Returns
Type | Description |
---|---|
System. |
True if the Entity |
ReadLocalizedTextValues(EntityObject)
Reads the localized text values for all localized properties of the underlying Model
Declaration
public void ReadLocalizedTextValues(EntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The entity object. |
RefreshEnvironment()
Refreshes the environment.
Declaration
public void RefreshEnvironment()
Implements
RefreshModel()
Refreshes the Model by reading it from the underlying metadata database
Declaration
public void RefreshModel()
Implements
Remarks
Before reading the Model from the database the system verifies that the Model in the database
has changed. This is done by comparing the local model version from the database with
the property Local
SaveChanges(ChangeTracker)
The method takes an instance of a Change
Declaration
public int SaveChanges(ChangeTracker tracker)
Parameters
Type | Name | Description |
---|---|---|
Change |
tracker | The tracker. |
Returns
Type | Description |
---|---|
System. |
An int that indicates how many changes have been saved |
SaveChangesAsync(ChangeTracker)
Saves a given Entity
Declaration
[Obsolete("Avoid until task based implementation becomes available.")]
public IObservable<int> SaveChangesAsync(ChangeTracker tracker)
Parameters
Type | Name | Description |
---|---|---|
Change |
tracker | The tracker for which to save the content. |
Returns
Type | Description |
---|---|
System. |
A instance of IConnectableObservable |
SaveModel(Model)
Saves all Model.
Declaration
public void SaveModel(Model model)
Parameters
SaveModelIfValid(Model)
Saves all Model.
Declaration
public void SaveModelIfValid(Model model)
Parameters
Remarks
Please be aware that a model might already be invalid before the currently pending operations were enqueued. If there is no guarantee/check that the initial model was valid, this method might throw a ValidationException even though the currently pending operations did not cause new issues.
SaveObject(EntityObject)
Saves a given Entity
Declaration
public void SaveObject(EntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The Entity |
SaveObject(EntityObject, SaveSettings)
Saves a given Entity
Declaration
public void SaveObject(EntityObject entityObject, SaveSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The Entity |
Save |
settings | Settings to use for the save operation. |
SaveObjectAsync(EntityObject)
Saves a given Entity
Declaration
[Obsolete("Avoid until task based implementation becomes available.")]
public IObservable<Unit> SaveObjectAsync(EntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The Entity |
Returns
Type | Description |
---|---|
System. |
A instance of IConnectableObservable |
Select(String, IEnumerable<QueryParameter>, SelectCache)
Executes a query with query parameters.
Declaration
public ICollection<EntityObject> Select(string query, IEnumerable<QueryParameter> queryParameters, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | Query to execute |
System. |
queryParameters | A list of System.Collections.Generic.IEnumerable<T> |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
A list of Entity |
Select(String, SelectCache)
Executes a query
Declaration
public ICollection<EntityObject> Select(string query, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | Query to execute. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
A list of Entity |
Select(Query, IEnumerable<QueryParameter>, SelectCache)
Executes a query with query parameters by passing in an AST tree.
Declaration
public ICollection<EntityObject> Select(Query query, IEnumerable<QueryParameter> queryParameters, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
Query | query | Query to execute as an AST representation. |
System. |
queryParameters | A list of System.Collections.Generic.IEnumerable<T> |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
A list of Entity |
Select(Query, SelectCache)
Executes a query passed as an AST.
Declaration
public ICollection<EntityObject> Select(Query query, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
Query | query | The query to select. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
Returns a list of Entity |
SelectAsync(String, IEnumerable<QueryParameter>, SelectCache)
Invokes the Select(String, IEnumerable<QueryParameter>, SelectCache) asynchronously
Declaration
public IObservable<EntityObject> SelectAsync(string query, IEnumerable<QueryParameter> queryParameters, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | a TCQL query |
System. |
queryParameters | a list of Query |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
An connectable observable of Entity |
SelectAsync(String, SelectCache)
Invokes the Select(String, Select
Declaration
[Obsolete("Avoid until task based implementation becomes available.")]
public IObservable<EntityObject> SelectAsync(string query, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | a TCQL query |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
returns a connectable observable producing the entity objects returned by the query. |
SelectAsync(Query, IEnumerable<QueryParameter>, SelectCache)
Invokes the
Declaration
public IObservable<EntityObject> SelectAsync(Query query, IEnumerable<QueryParameter> queryParameters, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
Query | query | The AST representation of a Query. |
System. |
queryParameters | a list of Query |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
An connectable observable of Entity |
SelectMultipleAsync(QueryRequest[], CancellationToken)
Issues multiple queries.
Declaration
public Task SelectMultipleAsync(QueryRequest[] queries, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Query |
queries | The queries to execute. |
System. |
cancellationToken | The cancellation token to cancel requests. |
Returns
Type | Description |
---|---|
System. |
Returns the tasks producing the results of the queries, in corresponding order. |
SelectSingle(String, IEnumerable<QueryParameter>, SelectCache)
Executes a query with a list of Query
Declaration
public EntityObject SelectSingle(string query, IEnumerable<QueryParameter> queryParameters, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | Query to execute |
System. |
queryParameters | A list of System.Collections.Generic.IEnumerable<T>. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
Entity |
A list of Entity |
SelectSingle(String, SelectCache)
Executes a query and returns the first row of the result set.
Declaration
public EntityObject SelectSingle(string query, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | Query to execute. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
Entity |
A single instance of Entity |
SelectSingle(IEntityObject, Boolean, SelectCache)
Executes a query by example and returns the first row of the result set
Declaration
public EntityObject SelectSingle(IEntityObject entityObject, bool autoIncludeRelations, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
IEntity |
entityObject | The example Entity |
System. |
autoIncludeRelations | If true, fetches the all relations of the Entity |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
Entity |
A single instance of Entity |
Remarks
This method returns the all relations of the returned Entity
SelectSingle(IEntityObject, SelectCache)
Executes a query by example and returns the first row of the result set
Declaration
public EntityObject SelectSingle(IEntityObject entityObject, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
IEntity |
entityObject | The example Entity |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
Entity |
An instance of Entity |
Remarks
This does not fetch include relations in the query. That is, if an Entity
SelectSingle(Query, IEnumerable<QueryParameter>, SelectCache)
Executes a query returning a single element.
Declaration
public EntityObject SelectSingle(Query query, IEnumerable<QueryParameter> queryParameters, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
Query | query | The query to execute. |
System. |
queryParameters | The query parameters to execute. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
Entity |
Returns the entity object returned by the query. |
SelectSingle(Query, SelectCache)
Executes a query and returns the first row of the result set.
Declaration
public EntityObject SelectSingle(Query query, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
Query | query | Query to execute. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
Entity |
A single instance of Entity |
SelectSingleAsync(String, IEnumerable<QueryParameter>, SelectCache)
Invokes the SelectSingle(String, IEnumerable<QueryParameter>, SelectCache) asynchronously
Declaration
public IObservable<EntityObject> SelectSingleAsync(string query, IEnumerable<QueryParameter> queryParameters, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | a TCQL query |
System. |
queryParameters | a list of Query |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
Returns a connectable observable of Entity |
SelectSingleAsync(String, SelectCache)
Invokes the Select
Declaration
public IObservable<EntityObject> SelectSingleAsync(string query, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | a TCQL query |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
Returns a connectable observable of Entity |
SelectSingleAsync(IEntityObject)
Executes a query by example and returns the first row of the result set
Declaration
public IObservable<EntityObject> SelectSingleAsync(IEntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
IEntity |
entityObject | The example Entity |
Returns
Type | Description |
---|---|
System. |
An instance of Entity |
Remarks
This does not fetch include relations in the query. That is, if an Entity
SelectSingleAsync(IEntityObject, Boolean, SelectCache)
Executes a query by example and returns the first row of the result set
Declaration
public IObservable<EntityObject> SelectSingleAsync(IEntityObject entityObject, bool autoIncludeRelations, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
IEntity |
entityObject | The example Entity |
System. |
autoIncludeRelations | If true, fetches the all relations of the Entity |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
A single instance of Entity |
Remarks
This method returns the all relations of the returned Entity
SelectSingleAsync(Query, IEnumerable<QueryParameter>)
Invokes the
Declaration
public IObservable<EntityObject> SelectSingleAsync(Query query, IEnumerable<QueryParameter> queryParameters)
Parameters
Type | Name | Description |
---|---|---|
Query | query | The AST representation of a Query. |
System. |
queryParameters | a list of Query |
Returns
Type | Description |
---|---|
System. |
An connectable observable producing an Entity |
SelectSingleWithParameters(IEnumerable<KeyValuePair<Object, Object>>)
Executes a query with query parameters and returns the first row of the result set
Declaration
public EntityObject SelectSingleWithParameters(IEnumerable<KeyValuePair<object, object>> parameters)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameters | A list of System.Collections.Generic.KeyValuePair<TKey, TValue>. |
Returns
Type | Description |
---|---|
Entity |
A single instance of Entity |
SelectSingleWithParametersAsync(IEnumerable<KeyValuePair<Object, Object>>)
Execute a query with query parameters asynchronously and returns an observable to the first row of the result set.
Declaration
public IObservable<EntityObject> SelectSingleWithParametersAsync(IEnumerable<KeyValuePair<object, object>> parameters)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameters | A list of System.Collections.Generic.KeyValuePair<TKey, TValue>. |
Returns
Type | Description |
---|---|
System. |
An observable to a single instance of Entity |
SelectTop(String, Int32, IEnumerable<QueryParameter>, SelectCache)
Executes a query with a list of Query
Declaration
public ICollection<EntityObject> SelectTop(string query, int rowCount, IEnumerable<QueryParameter> queryParameters, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | Query to execute. |
System. |
rowCount | The number rows to return. |
System. |
queryParameters | A list of System.Collections.Generic.IEnumerable<T>. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
A list of Entity |
SelectTop(String, Int32, SelectCache)
Executes a query but returns only the specified number of rows.
Declaration
public ICollection<EntityObject> SelectTop(string query, int rowCount, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | Query to execute. |
System. |
rowCount | The number of rows to return. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
A list of Entity |
SelectTopAsync(String, Int32, IEnumerable<QueryParameter>, SelectCache)
Executes a query with a list of Query
Declaration
public IObservable<EntityObject> SelectTopAsync(string query, int rowCount, IEnumerable<QueryParameter> queryParameters, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | Query to execute. |
System. |
rowCount | The number rows to return. |
System. |
queryParameters | A list of System.Collections.Generic.IEnumerable<T>. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
Returns a connectable observable of Entity |
SelectTopAsync(String, Int32, SelectCache)
Executes a query asynchronously but returns only the specified number of rows.
Declaration
public IObservable<EntityObject> SelectTopAsync(string query, int rowCount, SelectCache cache = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
query | Query to execute asynchronously. |
System. |
rowCount | The number of rows to return. |
Select |
cache | The entity object cache for reusing entities. |
Returns
Type | Description |
---|---|
System. |
A list of Entity |
SelectWithParameters(IEnumerable<KeyValuePair<Object, Object>>)
Executes a query with query parameters.
Declaration
public ICollection<EntityObject> SelectWithParameters(IEnumerable<KeyValuePair<object, object>> parameters)
Parameters
Type | Name | Description |
---|---|---|
System. |
parameters | A list of System.Collections.Generic.KeyValuePair<TKey, TValue>. |
Returns
Type | Description |
---|---|
System. |
A list of Entity |
Explicit Interface Implementations
IDataContext.DeleteObjectAsync(EntityObject)
Asynchronously deletes an object.
Declaration
Task IDataContext.DeleteObjectAsync(EntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The id and type of the entity to delete. |
Returns
Type | Description |
---|---|
System. |
Returns the task representing the operation. |
Implements
IDataContext.Localizer
Gets the localizer.
Declaration
NameLocalizer IDataContext.Localizer { get; }
Returns
Type | Description |
---|---|
Name |
Implements
IDataContext.Model
Gets the model of the context.
Declaration
Model IDataContext.Model { get; }
Returns
Type | Description |
---|---|
Model |
Implements
IDataContext.SaveChangesAsync(ChangeTracker)
Saves the changes from the change tracker to the data context.
Declaration
Task IDataContext.SaveChangesAsync(ChangeTracker changes)
Parameters
Type | Name | Description |
---|---|---|
Change |
changes | The Change |
Returns
Type | Description |
---|---|
System. |
Returns the task representing the operation. |
Implements
IDataContext.SaveObjectAsync(EntityObject)
Saves an object to the data context.
Declaration
Task IDataContext.SaveObjectAsync(EntityObject entityObject)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityObject | The entity object to save. |
Returns
Type | Description |
---|---|
System. |
Returns the task representing the operation. |
Implements
IDataContext.SelectMultipleAsync(QueryRequest[], CancellationToken)
Canonical method for querying a database with multiple queries at the same time.
Declaration
Task IDataContext.SelectMultipleAsync(QueryRequest[] queries, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Query |
queries | The query request objects. |
System. |
cancellationToken | A cancellation token used for all operations. |
Returns
Type | Description |
---|---|
System. |
Returns a list of tasks representing the query operations. |
Implements
Remarks
This interface is the lowest level interface and should support all scenarios required. Use
the helper methods in