Show / Hide Table of Contents

Class MongoDataContext

A data context for MongoDB.

Inheritance
System.Object
System.Dynamic.DynamicObject
ExpandoBase
Expando
Context
DataContextBase
MongoDataContext
Implements
IDataContext
IContext
IExpando
System.Dynamic.IDynamicMetaObjectProvider
IIndexable
ILoggable
IIdentifiable
System.IDisposable
IInitializable
Inherited Members
DataContextBase.InitializationMonitor
DataContextBase.Id
DataContextBase.EntityActivator
DataContextBase.LocalCache
DataContextBase.Initialize(IContext)
DataContextBase.Query<T>(IQueryOperationContext)
DataContextBase.CreateCommand(Type)
DataContextBase.GetEntityEntry(Object)
DataContextBase.Attach(Object)
DataContextBase.Detach(IEntityEntry)
DataContextBase.GetIdEqualityExpression<T>(Object)
DataContextBase.CreateEntityEntry(Object, Nullable<ChangeState>)
DataContextBase.AttachCore(Object, Boolean)
DataContextBase.ResolveAttachConflict(IEntityEntry, Object, Boolean)
DataContextBase.DetachCore(IEntityEntry, Boolean)
Context.AmbientServices
Context.CompositionContext
Context.Identity
Context.Logger
Context.Dispose()
Context.ValidateIdentity(IIdentity, IIdentity)
Context.SetCompositionContext(ICompositionContext)
Context.SetAmbientServices(IAmbientServices)
Context.Dispose(Boolean)
ExpandoBase.Item[String]
ExpandoBase.GetDynamicMemberNames()
ExpandoBase.HasDynamicMember(String)
ExpandoBase.TryGetMember(GetMemberBinder, Object)
ExpandoBase.TrySetMember(SetMemberBinder, Object)
ExpandoBase.TryInvokeMember(InvokeMemberBinder, Object[], Object)
ExpandoBase.ToDictionary(Func<String, String>, Func<Object, Object>)
ExpandoBase.GetInnerObjectTypeInfo()
ExpandoBase.GetThisTypeInfo()
ExpandoBase.TryGetValue(String, Object)
ExpandoBase.TrySetValue(String, Object)
System.Dynamic.DynamicObject.GetMetaObject(System.Linq.Expressions.Expression)
System.Dynamic.DynamicObject.TryBinaryOperation(System.Dynamic.BinaryOperationBinder, System.Object, System.Object)
System.Dynamic.DynamicObject.TryConvert(System.Dynamic.ConvertBinder, System.Object)
System.Dynamic.DynamicObject.TryCreateInstance(System.Dynamic.CreateInstanceBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryDeleteIndex(System.Dynamic.DeleteIndexBinder, System.Object[])
System.Dynamic.DynamicObject.TryDeleteMember(System.Dynamic.DeleteMemberBinder)
System.Dynamic.DynamicObject.TryGetIndex(System.Dynamic.GetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryInvoke(System.Dynamic.InvokeBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TrySetIndex(System.Dynamic.SetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryUnaryOperation(System.Dynamic.UnaryOperationBinder, System.Object)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data.MongoDB
Assembly: Kephas.Data.MongoDB.dll
Syntax
[SupportedDataStoreKinds(new DataStoreKind[]{DataStoreKind.MongoDB})]
public class MongoDataContext : DataContextBase, IDataContext, IContext, IExpando, IDynamicMetaObjectProvider, IIndexable, ILoggable, IIdentifiable, IDisposable, IInitializable

Constructors

| Improve this Doc View Source

MongoDataContext(ICompositionContext, IDataCommandProvider, IDataBehaviorProvider)

Initializes a new instance of the MongoDataContext class.

Declaration
public MongoDataContext(ICompositionContext compositionContext, IDataCommandProvider dataCommandProvider, IDataBehaviorProvider dataBehaviorProvider)
Parameters
Type Name Description
ICompositionContext compositionContext

The composition context.

IDataCommandProvider dataCommandProvider

The data command provider.

IDataBehaviorProvider dataBehaviorProvider

The data behavior provider.

Properties

| Improve this Doc View Source

Client

Gets the MongoDB client.

Declaration
public IMongoClient Client { get; }
Property Value
Type Description
MongoDB.Driver.IMongoClient

The MongoDB client.

| Improve this Doc View Source

Database

Gets the MongoDB database.

Declaration
public IMongoDatabase Database { get; }
Property Value
Type Description
MongoDB.Driver.IMongoDatabase

The MongoDB database.

Methods

| Improve this Doc View Source

GetCollectionName(Type)

Gets the collection name for the provided entity type.

Declaration
protected virtual string GetCollectionName(Type entityType)
Parameters
Type Name Description
System.Type entityType

Type of the entity.

Returns
Type Description
System.String

The collection name.

| Improve this Doc View Source

Initialize(IDataInitializationContext)

Initializes the MongoDataContext.

Declaration
protected override void Initialize(IDataInitializationContext dataInitializationContext)
Parameters
Type Name Description
IDataInitializationContext dataInitializationContext

The data initialization context.

Overrides
DataContextBase.Initialize(IDataInitializationContext)
| Improve this Doc View Source

QueryCore<T>(IQueryOperationContext)

Gets a query over the entity type for the given query operation context, 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.

Overrides
DataContextBase.QueryCore<T>(IQueryOperationContext)

Implements

IDataContext
IContext
IExpando
System.Dynamic.IDynamicMetaObjectProvider
IIndexable
ILoggable
IIdentifiable
System.IDisposable
IInitializable

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)
ContextExtensions.InitialData(IContext)
ContextExtensions.WithInitialData<TContext>(TContext, IEnumerable<(Object entity, ChangeState changeState)>)
ContextExtensions.WithInitialData<TContext>(TContext, IEnumerable<Object>)
ContextExtensions.WithInitialData<TContext>(TContext, IEnumerable<IChangeStateTrackableEntityEntry>)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX