IVariableDataService
Handles the dynamic data sets and entities.
Methods
RegisterAddonRepository
Registers the given
Parameters
| Name | Type | Description |
|---|---|---|
| repository | TR | The repository to register. |
RegisterSetAttributes
Registers attributes to the given dynamic data set type.
Parameters
| Name | Type | Description |
|---|---|---|
| attributes | List<VariableDataAttribute> | The attributes to register. |
UpdateSetAttribute
Updates the attribute of the given name with the values of
Parameters
| Name | Type | Description |
|---|---|---|
| attributeName | string | The attribute's name to delete. |
| newAttributeValues | VariableDataAttribute | The new values of the attribute. |
DeleteSetAttribute
Deletes an attribute with the given name from the
Parameters
| Name | Type | Description |
|---|---|---|
| attributeName | string | The attribute's name to delete. |
OnAdded
Fires when an entity is added to the given
Parameters
| Name | Type | Description |
|---|---|---|
| observer | Action<VariableDataEvent> | The action that will executed upon firing with the added entity. |
Returns
| Name | Type |
|---|---|
| IDisposable | A disposable |
OnUpdated
Fires when an entity in the given
Parameters
| Name | Type | Description |
|---|---|---|
| observer | Action<VariableDataEvent> | The action that will executed upon firing with the edited entity. |
Returns
| Name | Type |
|---|---|
| IDisposable | A disposable |
OnDeleted
Fires when an entity from the given
Parameters
| Name | Type | Description |
|---|---|---|
| observer | Action<VariableDataEvent> | The action that will executed upon fire deleted entity. |
Returns
| Name | Type |
|---|---|
| IDisposable | A disposable |
AddEntity
Inserts an entity into the database with all its values mapped to the attributes of the given set. If a property doesn't exist as an attribute it won't be saved.
Parameters
| Name | Type | Description |
|---|---|---|
| entityToAdd | VariableDataEntity | The entity to insert. |
Returns
| Name | Type |
|---|---|
| VariableDataEntity | The inserted entity. |
UpdateEntity
Updates the values of the entity in the database.
Parameters
| Name | Type | Description |
|---|---|---|
| entityToUpdate | VariableDataEntity | The entity to update. |
DeleteEntity
Deletes an entity.
Parameters
| Name | Type | Description |
|---|---|---|
| entityToDelete | VariableDataEntity | The entity to delete. |
GetEntity
Finds and maps the first entity with the given id.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string | The id of the entity. |
Returns
| Name | Type |
|---|---|
| VariableDataEntity | The first entity with the given id. |
GetEntity
Finds and maps the first entity with the given id.
Parameters
| Name | Type | Description |
|---|---|---|
| id | string | The id of the entity. |
| withTracking | bool | Whether to track the entities or not. |
| queryCoreAttributeValue | bool | Whether to query the core attribute values or not. |
Returns
| Name | Type |
|---|---|
| VariableDataEntity | The first entity with the given id. |
GetEntities
Finds and maps all entities of the given set.
Parameters
| Name | Type | Description |
|---|---|---|
| withTracking | bool | Whether to track the entities or not. |
| queryCoreAttributeValue | bool | Whether to query the core attribute values or not. |
| filter | Dictionary<string, object> | The filter to apply to the query. |
Returns
| Name | Type |
|---|---|
| List<VariableDataEntity> | All entities of the set. |
GetEntities
Finds and maps all entities of the given set.
Parameters
| Name | Type | Description |
|---|---|---|
| setType | Type | The id of the set. |
| withTracking | bool | Whether to track the entities or not. |
| queryCoreAttributeValue | bool | Whether to query the core attribute values or not. |
| filter | Dictionary<string, object> | The filter to apply to the query. |
Returns
| Name | Type |
|---|---|
| List<VariableDataEntity> | All entities of the set. |