Class EPiServerDynamicDataStore
Class to read, write and search data in a store
Implements
Inherited Members
Namespace: EPiServer.Data.Dynamic.Internal
Assembly: EPiServer.Data.dll
Version: 12.0.3Syntax
public class EPiServerDynamicDataStore : DynamicDataStore, IDisposable
Constructors
EPiServerDynamicDataStore(StoreDefinition, DataStoreProvider)
Declaration
public EPiServerDynamicDataStore(StoreDefinition storeDefinition, DataStoreProvider dataStoreProvider)
Parameters
Type | Name | Description |
---|---|---|
StoreDefinition | storeDefinition | |
DataStoreProvider | dataStoreProvider |
Properties
DataStoreProvider
The store's DataStoreProvider
Declaration
public override DataStoreProvider DataStoreProvider { get; set; }
Property Value
Type | Description |
---|---|
DataStoreProvider |
Overrides
Name
The name of the current store
Declaration
public override string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
StoreDefinition
The StoreDefinition for the current store
Declaration
public override StoreDefinition StoreDefinition { get; }
Property Value
Type | Description |
---|---|
StoreDefinition |
Overrides
Methods
Delete(Identity)
Delete an item from the store
Declaration
public override void Delete(Identity id)
Parameters
Type | Name | Description |
---|---|---|
Identity | id | The Identity of the item to delete |
Overrides
Delete(Object)
Delete an item from the store
Declaration
public override void Delete(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The object to delete from the store.
The Identity of the item to delete must be able to be derived from |
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown if the Identity of |
DeleteAll()
Delete all items in the store
Declaration
public override void DeleteAll()
Overrides
Find(IDictionary<String, Object>)
Find objects of from the store that match the conditions and return them as as the same .NET class they were saved as
Declaration
public override IEnumerable<object> Find(IDictionary<string, object> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | parameters | An dictionary containing property names and values to use when finding objects |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | Enumeration of System.Object |
Overrides
Find(String, Object)
Find objects of from the store that match the condition and return them as the same .NET class they were saved as
Declaration
public override IEnumerable<object> Find(string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The name of the property to use when finding objects |
System.Object | value | The value of the property to match to |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | Enumeration of System.Object |
Overrides
Find<TResult>(IDictionary<String, Object>)
Find objects of from the store that match the conditions and return them as as TResult instances
Declaration
public override IEnumerable<TResult> Find<TResult>(IDictionary<string, object> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | parameters | An dictionary containing property names and values to use when finding objects |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TResult> | Enumeration of TResult |
Type Parameters
Name | Description |
---|---|
TResult | The System.Type the properties for each store item will be loaded into |
Overrides
Find<TResult>(String, Object)
Find objects of from the store that match the condition and return them as TResult instances
Declaration
public override IEnumerable<TResult> Find<TResult>(string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The name of the property to use when finding objects |
System.Object | value | The value of the property to match to |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TResult> | Enumeration of TResult |
Type Parameters
Name | Description |
---|---|
TResult | The System.Type the properties for each store item will be loaded into |
Overrides
FindAsPropertyBag(IDictionary<String, Object>)
Find objects of from the store that match the conditions and return them as as PropertyBag instances
Declaration
public override IEnumerable<PropertyBag> FindAsPropertyBag(IDictionary<string, object> parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | parameters | An dictionary containing property names and values to use when finding objects |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyBag> | Enumeration of PropertyBag |
Overrides
FindAsPropertyBag(String, Object)
Find objects of from the store that match the condition and return them as PropertyBag instances
Declaration
public override IEnumerable<PropertyBag> FindAsPropertyBag(string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The name of the property to use when finding objects |
System.Object | value | The value of the property to match to |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyBag> | Enumeration of PropertyBag |
Overrides
Items()
An ordered queryable to allow Linq operations to be performed against the store
Declaration
public override IOrderedQueryable<object> Items()
Returns
Type | Description |
---|---|
System.Linq.IOrderedQueryable<System.Object> |
Overrides
Items<TResult>()
An ordered queryable to allow Linq operations to be performed against the store
Declaration
public override IOrderedQueryable<TResult> Items<TResult>()
Returns
Type | Description |
---|---|
System.Linq.IOrderedQueryable<TResult> | An System.Linq.IOrderedQueryable of TResult |
Type Parameters
Name | Description |
---|---|
TResult | The System.Type the properties for each store item will be loaded into |
Overrides
ItemsAsPropertyBag()
An ordered queryable to allow Linq operations to be performed against the store
Declaration
public override IOrderedQueryable<PropertyBag> ItemsAsPropertyBag()
Returns
Type | Description |
---|---|
System.Linq.IOrderedQueryable<PropertyBag> | An System.Linq.IOrderedQueryable of PropertyBag |
Overrides
Load(Identity)
Load an instance of an object from the store as the same .NET class it was saved as
Declaration
public override object Load(Identity id)
Parameters
Type | Name | Description |
---|---|---|
Identity | id | The Identity of the item to load |
Returns
Type | Description |
---|---|
System.Object | The native object stored in the store. If the item was originally saved in a PropertyBag then a PropertyBag will be returned otherwise an instance of the System.Type originally saved will be returned. |
Overrides
Load<TResult>(Identity)
Load an instance of an object from the store into a TResult
Declaration
public override TResult Load<TResult>(Identity id)
Parameters
Type | Name | Description |
---|---|---|
Identity | id | The Identity of the item to load |
Returns
Type | Description |
---|---|
TResult | An instance of TResult |
Type Parameters
Name | Description |
---|---|
TResult | The System.Type the properties for each store item will be loaded into |
Overrides
LoadAll()
Loads all objects from the store as the same .NET class they were saved as
Declaration
public override IEnumerable<object> LoadAll()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | Enumeration of System.Object |
Overrides
LoadAll<TResult>()
Loads all objects from the store as TResult instances
Declaration
public override IEnumerable<TResult> LoadAll<TResult>()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TResult> | Enumeration of TResult |
Type Parameters
Name | Description |
---|---|
TResult | The System.Type the properties for each store item will be loaded into |
Overrides
LoadAllAsPropertyBag()
Loads all objects from the store as PropertyBag instances
Declaration
public override IEnumerable<PropertyBag> LoadAllAsPropertyBag()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PropertyBag> | Enumeration of PropertyBag |
Overrides
LoadAsPropertyBag(Identity)
Load an instance of an object from the store into a PropertyBag
Declaration
public override PropertyBag LoadAsPropertyBag(Identity id)
Parameters
Type | Name | Description |
---|---|---|
Identity | id | The identity of the item to load |
Returns
Type | Description |
---|---|
PropertyBag | An instance of PropertyBag or null if the item was not found in the store |
Overrides
Refresh()
Refresh any cached properties from their source
Declaration
public override void Refresh()
Overrides
Save(Object)
Save value
in the store
Declaration
public override Identity Save(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The object to save |
Returns
Type | Description |
---|---|
Identity | The identity of the saved object |
Overrides
Save(Object, TypeToStoreMapper)
Save value
in the store
Declaration
public override Identity Save(object value, TypeToStoreMapper typeToStoreMapper)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The object to save |
TypeToStoreMapper | typeToStoreMapper | A delegate of type TypeToStoreMapper to use when mapping properties to stores |
Returns
Type | Description |
---|---|
Identity | The identity of the saved object |
Overrides
Save(Object, Identity)
Save value
in the store
Declaration
public override Identity Save(object value, Identity id)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The object to save |
Identity | id | The id saved the object under |
Returns
Type | Description |
---|---|
Identity | The identity of the saved object |
Overrides
Save(Object, Identity, TypeToStoreMapper)
Save value
in the store
Declaration
public override Identity Save(object value, Identity id, TypeToStoreMapper typeToStoreMapper)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The object to save |
Identity | id | The id saved the object under |
TypeToStoreMapper | typeToStoreMapper | A delegate of type TypeToStoreMapper to use when mapping properties to stores |
Returns
Type | Description |
---|---|
Identity | The identity of the saved object |
Overrides
Update<TStore>()
Declaration
public override IUpdateQueryable<TStore> Update<TStore>()
Returns
Type | Description |
---|---|
IUpdateQueryable<TStore> |
Type Parameters
Name | Description |
---|---|
TStore |