Show / Hide Table of Contents

Interface IDataContext

Contract interface for data contexts.

Inherited Members
IContext.CompositionContext
IContext.AmbientServices
IContext.Identity
IExpando.HasDynamicMember(String)
IExpando.ToDictionary(Func<String, String>, Func<Object, Object>)
System.Dynamic.IDynamicMetaObjectProvider.GetMetaObject(System.Linq.Expressions.Expression)
IIndexable.Item[String]
ILoggable.Logger
IIdentifiable.Id
System.IDisposable.Dispose()
IInitializable.Initialize(IContext)
Namespace: Kephas.Data
Assembly: Kephas.Data.dll
Syntax
[AppServiceContract(AllowMultiple = true, MetadataAttributes = new Type[]{typeof(SupportedDataStoreKindsAttribute)})]
public interface IDataContext : IContext, IExpando, IDynamicMetaObjectProvider, IIndexable, ILoggable, IIdentifiable, IDisposable, IInitializable

Methods

| Improve this Doc View Source

Attach(Object)

Attaches the entity to the data context.

Declaration
IEntityEntry Attach(object entity)
Parameters
Type Name Description
System.Object entity

The entity.

Returns
Type Description
IEntityEntry

The entity extended information.

| Improve this Doc View Source

CreateCommand(Type)

Creates the command with the provided type.

Declaration
IDataCommand CreateCommand(Type commandType)
Parameters
Type Name Description
System.Type commandType

The type of the command to be created.

Returns
Type Description
IDataCommand

The new command.

| Improve this Doc View Source

Detach(IEntityEntry)

Detaches the entity from the data context.

Declaration
IEntityEntry Detach(IEntityEntry entityEntry)
Parameters
Type Name Description
IEntityEntry entityEntry

The entity entry.

Returns
Type Description
IEntityEntry

The entity extended information.

| Improve this Doc View Source

GetEntityEntry(Object)

Gets the entity entry.

Declaration
IEntityEntry GetEntityEntry(object entity)
Parameters
Type Name Description
System.Object entity

The entity.

Returns
Type Description
IEntityEntry

The entity entry.

| Improve this Doc View Source

Query<T>(IQueryOperationContext)

Gets a query over the entity type for the given query operation context, if any is provided.

Declaration
IQueryable<T> Query<T>(IQueryOperationContext queryOperationContext = null)

    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.

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)
MessageBrokerExtensions.CreateBrokeredMessageBuilder(IContext)
ContextExtensions.InitialData(IContext)
ContextExtensions.WithInitialData<TContext>(TContext, IEnumerable<(Object entity, ChangeState changeState)>)
ContextExtensions.WithInitialData<TContext>(TContext, IEnumerable<Object>)
ContextExtensions.WithInitialData<TContext>(TContext, IEnumerable<IChangeStateTrackableEntityEntry>)
DataContextExtensions.Detach(IDataContext, Object)
DataContextExtensions.CreateCommand<TCommand>(IDataContext)
DataContextExtensions.CreateAsync(IDataContext, Type, CancellationToken)
DataContextExtensions.CreateAsync(IDataContext, ICreateEntityContext, CancellationToken)
DataContextExtensions.CreateAsync<T>(IDataContext, CancellationToken)
DataContextExtensions.CreateAsync<T>(IDataContext, ICreateEntityContext, CancellationToken)
DataContextExtensions.FindAsync(IDataContext, Type, Object, Boolean, CancellationToken)
DataContextExtensions.FindAsync(IDataContext, IFindContext, CancellationToken)
DataContextExtensions.FindAsync<T>(IDataContext, IFindContext, CancellationToken)
DataContextExtensions.FindAsync<T>(IDataContext, Object, Boolean, CancellationToken)
DataContextExtensions.FindOneAsync(IDataContext, IFindOneContext, CancellationToken)
DataContextExtensions.FindOneAsync<T>(IDataContext, IFindOneContext, CancellationToken)
DataContextExtensions.FindOneAsync<T>(IDataContext, Expression<Func<T, Boolean>>, Boolean, CancellationToken)
DataContextExtensions.PersistChangesAsync(IDataContext, IPersistChangesContext, CancellationToken)
DataContextExtensions.DiscardChanges(IDataContext)
DataContextExtensions.Delete<T>(IDataContext, T[])
DataContextExtensions.Delete<T>(IDataContext, IEnumerable<T>)
DataContextExtensions.BulkDeleteAsync(IDataContext, IBulkDeleteContext, CancellationToken)
DataContextExtensions.BulkDeleteAsync<T>(IDataContext, Expression<Func<T, Boolean>>, Boolean, CancellationToken)
DataContextExtensions.BulkUpdateAsync<T>(IDataContext, Expression<Func<T, Boolean>>, Object, Boolean, CancellationToken)
DataContextExtensions.BulkUpdateAsync(IDataContext, IBulkUpdateContext, CancellationToken)
DataContextExtensions.ExecuteAsync(IDataContext, String, CancellationToken)
DataContextExtensions.ExecuteAsync(IDataContext, IExecuteContext, CancellationToken)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX