Show / Hide Table of Contents

Interface IDataContextFactory

Factory service for data contexts.

Namespace: Kephas.Data
Assembly: Kephas.Data.dll
Syntax
[SingletonAppServiceContract]
public interface IDataContextFactory
Remarks

Data contexts are dependent on initialization data, which typically contains at least data store connection information. Due to the fact that multiple physical data stores may be served by the same data context implementation and that by design, at one time, a data context instance may be connected to a single physical data store, there must be a factory service that creates a data context for a given connection. This is the data context factory application service.

Methods

| Improve this Doc View Source

CreateDataContext(String, IContext)

Creates a data context for the provided data store name and initializes it.

Declaration
IDataContext CreateDataContext(string dataStoreName, IContext initializationContext = null)
Parameters
Type Name Description
System.String dataStoreName

Name of the data store. This identifies typically an entry in the configuration where connection information and other initialization data is provided.

IContext initializationContext

An initialization context (optional).

Returns
Type Description
IDataContext

The newly created data context.

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX