Interface IDataContext
Contract interface for data contexts.
Inherited Members
System.Dynamic.IDynamicMetaObjectProvider.GetMetaObject(System.Linq.Expressions.Expression)
System.IDisposable.Dispose()
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 SourceAttach(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. |
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. |
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. |
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. |
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. |