Class InMemoryDataContext
Client data context managing.
Inheritance
Implements
Inherited Members
Namespace: Kephas.Data.InMemory
Assembly: Kephas.Data.dll
Syntax
[SupportedDataStoreKinds(new DataStoreKind[]{DataStoreKind.InMemory})]
public class InMemoryDataContext : DataContextBase, IDataContext, IContext, IExpando, IDynamicMetaObjectProvider, IIndexable, ILoggable, IIdentifiable, IDisposable, IInitializable
Remarks
For the connection string, use something like in the example below: ConnectionString=UseSharedCache=true|false;InitialData=(JSON serialized data).
Constructors
| Improve this Doc View SourceInMemoryDataContext(ICompositionContext, IDataCommandProvider, IDataBehaviorProvider, ISerializationService)
Initializes a new instance of the InMemoryDataContext class.
Declaration
public InMemoryDataContext(ICompositionContext compositionContext, IDataCommandProvider dataCommandProvider, IDataBehaviorProvider dataBehaviorProvider, ISerializationService serializationService)
Parameters
Type | Name | Description |
---|---|---|
ICompositionContext | compositionContext | The composition context. |
IDataCommandProvider | dataCommandProvider | The data command provider. |
IDataBehaviorProvider | dataBehaviorProvider | The data behavior provider. |
ISerializationService | serializationService | The serialization service. |
Properties
| Improve this Doc View SourceLocalCache
Gets the local cache where the session entities are stored.
Declaration
protected override IDataContextCache LocalCache { get; }
Property Value
Type | Description |
---|---|
IDataContextCache | The local cache. |
Overrides
| Improve this Doc View SourceSerializationService
Gets the serialization service.
Declaration
public ISerializationService SerializationService { get; }
Property Value
Type | Description |
---|---|
ISerializationService | The serialization service. |
UseSharedCache
Gets a value indicating whether to use the shared cache or not.
Declaration
protected bool UseSharedCache { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if shared cache is used, false if not. |
Methods
| Improve this Doc View SourceDispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
|
Overrides
| Improve this Doc View SourceGetEntityEntry(Object)
Gets the entity extended information.
Declaration
public override IEntityEntry GetEntityEntry(object entity)
Parameters
Type | Name | Description |
---|---|---|
System.Object | entity | The entity. |
Returns
Type | Description |
---|---|
IEntityEntry | The entity extended information. |
Overrides
| Improve this Doc View SourceInitialize(IDataInitializationContext)
Initializes the InMemoryDataContext.
Declaration
protected override void Initialize(IDataInitializationContext dataInitializationContext)
Parameters
Type | Name | Description |
---|---|---|
IDataInitializationContext | dataInitializationContext | The data initialization context. |
Overrides
| Improve this Doc View SourceQueryCore<T>(IQueryOperationContext)
Gets a query over the entity type for the given query operationContext, if any is provided.
Declaration
protected override IQueryable<T> QueryCore<T>(IQueryOperationContext queryOperationContext)
where T : class
Parameters
Type | Name | Description |
---|---|---|
IQueryOperationContext | queryOperationContext | Context for the query. |
Returns
Type | Description |
---|---|
System.Linq.IQueryable<T> | A query over the entity type. |
Type Parameters
Name | Description |
---|---|
T | The entity type. |