Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

System.Data.Entity.Infrastructure Namespace

 

The System.Data.Entity.Infrastructure namespace contains classes that support core Entity Framework functionality.

ClassDescription
System_CAPS_pubclassCommitFailedException

The exception that is thrown when an error occurs committing a DbTransaction.

System_CAPS_pubclassCommitFailureHandler

Represents a transaction handler that allows graceful recovery from connection failures during transaction commit by storing transaction tracing information in the database. It needs to be registered by using SetDefaultTransactionHandler.

System_CAPS_pubclassDbChangeTracker

Returned by the ChangeTracker method of DbContext to provide access to features of the context that are related to change tracking of entities.

System_CAPS_pubclassDbCollectionEntry

Represents a non-generic version of the DbCollectionEntry<TEntity, TElement> class.

System_CAPS_pubclassDbCollectionEntry<TEntity, TElement>

Instances of this class are returned from the Collection method of DbEntityEntry<TEntity> and allow operations such as loading to be performed on the an entity's collection navigation properties.

System_CAPS_pubclassDbCompiledModel

An immutable representation of an Entity Data Model (EDM) model that can be used to create an ObjectContext or can be passed to the constructor of a DbContext. For increased performance, instances of this type should be cached and re-used to construct contexts.

System_CAPS_pubclassDbComplexPropertyEntry

A non-generic version of the DbComplexPropertyEntry<TEntity, TComplexProperty> class.

System_CAPS_pubclassDbComplexPropertyEntry<TEntity, TComplexProperty>

Instances of this class are returned from the ComplexProperty method of DbEntityEntry<TEntity> and allow access to the state of a complex property.

System_CAPS_pubclassDbConnectionInfo

Represents information about a database connection.

System_CAPS_pubclassDbContextConfiguration

Returned by the Configuration method of DbContext to provide access to configuration options for the context.

System_CAPS_pubclassDbContextInfo

Provides runtime information about a given DbContext type.

System_CAPS_pubclassDbEntityEntry

A non-generic version of the DbEntityEntry<TEntity> class.

System_CAPS_pubclassDbEntityEntry<TEntity>

Instances of this class provide access to information about and control of entities that are being tracked by the DbContext. Use the Entity or Entities methods of the context to obtain objects of this type.

System_CAPS_pubclassDbExecutionStrategy

Provides the base implementation of the retry mechanism for unreliable operations and transient conditions that uses exponentially increasing delays between retries.

System_CAPS_pubclassDbMemberEntry

This is an abstract base class use to represent a scalar or complex property, or a navigation property of an entity. Scalar and complex properties use the derived class DbPropertyEntry, reference navigation properties use the derived class DbReferenceEntry, and collection navigation properties use the derived class DbCollectionEntry.

System_CAPS_pubclassDbMemberEntry<TEntity, TProperty>

This is an abstract base class use to represent a scalar or complex property, or a navigation property of an entity. Scalar and complex properties use the derived class DbPropertyEntry<TEntity, TProperty>, reference navigation properties use the derived class DbReferenceEntry<TEntity, TProperty>, and collection navigation properties use the derived class DbCollectionEntry<TEntity, TElement>.

System_CAPS_pubclassDbModel

Represents an Entity Data Model (EDM) created by the DbModelBuilder. The Compile method can be used to go from this EDM representation to a DbCompiledModel which is a compiled snapshot of the model suitable for caching and creation of DbContext or ObjectContext instances.

System_CAPS_pubclassDbPropertyEntry

A non-generic version of the DbPropertyEntry<TEntity, TProperty> class.

System_CAPS_pubclassDbPropertyEntry<TEntity, TProperty>

Instances of this class are returned from the Property method of DbEntityEntry<TEntity> and allow access to the state of the scalar or complex property.

System_CAPS_pubclassDbPropertyValues

A collection of all the properties for an underlying entity or complex object.

System_CAPS_pubclassDbProviderInfo

Groups a pair of strings that identify a provider and server version together into a single object.

System_CAPS_pubclassDbQuery

Represents a non-generic LINQ to Entities query against a DbContext.

System_CAPS_pubclassDbQuery<TResult>

Represents a LINQ to Entities query against a DbContext.

System_CAPS_pubclassDbRawSqlQuery

Represents a SQL query for non-entities that is created from a DbContext and is executed using the connection from that context. Instances of this class are obtained from the Database instance. The query is not executed when this object is created; it is executed each time it is enumerated, for example by using foreach. SQL queries for entities are created using SqlQuery. See DbRawSqlQuery<TElement> for a generic version of this class.

System_CAPS_pubclassDbRawSqlQuery<TElement>

Represents a SQL query for non-entities that is created from a DbContext and is executed using the connection from that context. Instances of this class are obtained from the Database instance. The query is not executed when this object is created; it is executed each time it is enumerated, for example by using foreach. SQL queries for entities are created using SqlQuery. See DbRawSqlQuery for a non-generic version of this class.

System_CAPS_pubclassDbReferenceEntry

A non-generic version of the DbReferenceEntry<TEntity, TProperty> class.

System_CAPS_pubclassDbReferenceEntry<TEntity, TProperty>

Instances of this class are returned from the Reference method of DbEntityEntry<TEntity> and allow operations such as loading to be performed on the an entity's reference navigation properties.

System_CAPS_pubclassDbSqlQuery

Represents a SQL query for entities that is created from a DbContext and is executed using the connection from that context. Instances of this class are obtained from the DbSet instance for the entity type. The query is not executed when this object is created; it is executed each time it is enumerated, for example by using foreach. SQL queries for non-entities are created using SqlQuery. See DbSqlQuery<TEntity> for a generic version of this class.

System_CAPS_pubclassDbSqlQuery<TEntity>

Represents a SQL query for entities that is created from a DbContext and is executed using the connection from that context. Instances of this class are obtained from the DbSet<TEntity> instance for the entity type. The query is not executed when this object is created; it is executed each time it is enumerated, for example by using foreach. SQL queries for non-entities are created using SqlQuery<TElement>. See DbSqlQuery for a non-generic version of this class.

System_CAPS_pubclassDbUpdateConcurrencyException

Exception thrown by DbContext when it was expected that SaveChanges for an entity would result in a database update but in fact no rows in the database were affected. This usually indicates that the database has been concurrently updated such that a concurrency token that was expected to match did not actually match. Note that state entries referenced by this exception are not serialized due to security and accesses to the state entries after serialization will return null.

System_CAPS_pubclassDbUpdateException

Exception thrown by DbContext when the saving of changes to the database fails. Note that state entries referenced by this exception are not serialized due to security and accesses to the state entries after serialization will return null.

System_CAPS_pubclassDefaultExecutionStrategy

Represents the default IDbExecutionStrategy that doesn't retry operations if they fail.

System_CAPS_pubclassDefaultManifestTokenResolver

Represents a default implementation of IManifestTokenResolver that uses the underlying provider to get the manifest token. Note that to avoid multiple queries, this implementation using caching based on the actual type of DbConnection instance, the DataSource property, and the Database property.

System_CAPS_pubclassEdmMetadata

Obsolete.Represents an entity used to store metadata about an EDM in the database.

System_CAPS_pubclassEdmxWriter

Contains methods used to access the Entity Data Model created by Code First in the EDMX form. These methods are typically used for debugging when there is a need to look at the model that Code First creates internally.

System_CAPS_pubclassExecutionStrategyKey

A key used for resolving Func<TResult>. It consists of the ADO.NET provider invariant name and the database server name as specified in the connection string.

System_CAPS_pubclassIncludeMetadataConvention

Obsolete.This DbModelBuilder convention causes DbModelBuilder to include metadata about the model when it builds the model. When DbContext creates a model by convention it will add this convention to the list of those used by the DbModelBuilder. This will then result in model metadata being written to the database if the DbContext is used to create the database. This can then be used as a quick check to see if the model has changed since the last time it was used against the database. This convention can be removed from the DbModelBuilder conventions by overriding the OnModelCreating method on a derived DbContext class.

System_CAPS_pubclassLocalDbConnectionFactory

Instances of this class are used to create DbConnection objects for SQL Server LocalDb based on a given database name or connection string.

System_CAPS_pubclassModelContainerConvention

This DbModelBuilder convention uses the name of the derived DbContext class as the container for the conceptual model built by Code First.

System_CAPS_pubclassModelNamespaceConvention

This DbModelBuilder convention uses the namespace of the derived DbContext class as the namespace of the conceptual model built by Code First.

System_CAPS_pubclassObjectReferenceEqualityComparer

Compares objects using reference equality.

System_CAPS_pubclassReplacementDbQueryWrapper<TElement>

Instances of this class are used internally to create constant expressions for ObjectQuery<T> that are inserted into the expression tree to replace references to DbQuery<TResult> and DbQuery.

System_CAPS_pubclassRetryLimitExceededException

The exception that is thrown when the action failed again after being retried the configured number of times.

System_CAPS_pubclassSqlCeConnectionFactory

Instances of this class are used to create DbConnection objects for SQL Server Compact Edition based on a given database name or connection string.

System_CAPS_pubclassSqlConnectionFactory

Instances of this class are used to create DbConnection objects for SQL Server based on a given database name or connection string. By default, the connection is made to '.\SQLEXPRESS'. This can be changed by changing the base connection string when constructing a factory instance.

System_CAPS_pubclassSuppressDbSetInitializationAttribute

This attribute can be applied to either an entire derived DbContext class or to individual DbSet<TEntity> or IDbSet<TEntity> properties on that class. When applied any discovered DbSet<TEntity> or IDbSet<TEntity> properties will still be included in the model but will not be automatically initialized.

System_CAPS_pubclassTableExistenceChecker

Implemented by Entity Framework providers and used to check whether or not tables exist in a given database. This is used by database initializers when determining whether or not to treat an existing database as empty such that tables should be created.

System_CAPS_pubclassTransactionContext

This class is used by CommitFailureHandler to write and read transaction tracing information from the database. To customize the definition of the transaction table you can derive from this class and override OnModelCreating. Derived classes can be registered using DbConfiguration.

System_CAPS_pubclassTransactionHandler

Represents the base class for interceptors that handle the transaction operations. Derived classes can be registered using SetDefaultTransactionHandler or SetTransactionHandler.

System_CAPS_pubclassTransactionRow

Represents a transaction.

System_CAPS_pubclassUnintentionalCodeFirstException

Thrown when a context is generated from the DbContext templates in Database First or Model First mode and is then used in Code First mode.

InterfaceDescription
System_CAPS_pubinterfaceIDbAsyncEnumerable

Asynchronous version of the IEnumerable interface that allows elements to be retrieved asynchronously. This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.

System_CAPS_pubinterfaceIDbAsyncEnumerable<T>

Asynchronous version of the IEnumerable<T> interface that allows elements of the enumerable sequence to be retrieved asynchronously. This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.

System_CAPS_pubinterfaceIDbAsyncEnumerator

Asynchronous version of the IEnumerator interface that allows elements to be retrieved asynchronously. This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.

System_CAPS_pubinterfaceIDbAsyncEnumerator<T>

Asynchronous version of the IEnumerator<T> interface that allows elements to be retrieved asynchronously. This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.

System_CAPS_pubinterfaceIDbAsyncQueryProvider

Defines methods to create and asynchronously execute queries that are described by an IQueryable object. This interface is used to interact with Entity Framework queries and shouldn't be implemented by custom classes.

System_CAPS_pubinterfaceIDbConnectionFactory

Implementations of this interface are used to create DbConnection objects for a type of database server based on a given database name. An Instance is set on the Database class to cause all DbContexts created with no connection information or just a database name or connection string to use a certain type of database server by default. Two implementations of this interface are provided: SqlConnectionFactory is used to create connections to Microsoft SQL Server, including EXPRESS editions. SqlCeConnectionFactory is used to create connections to Microsoft SQL Server Compact Editions. Other implementations for other database servers can be added as needed. Note that implementations should be thread safe or immutable since they may be accessed by multiple threads at the same time.

System_CAPS_pubinterfaceIDbContextFactory<TContext>

A factory for creating derived DbContext instances. Implement this interface to enable design-time services for context types that do not have a public default constructor. At design-time, derived DbContext instances can be created in order to enable specific design-time experiences such as model rendering, DDL generation etc. To enable design-time instantiation for derived DbContext types that do not have a public, default constructor, implement this interface. Design-time services will auto-discover implementations of this interface that are in the same assembly as the derived DbContext type.

System_CAPS_pubinterfaceIDbExecutionStrategy

A strategy that is used to execute a command or query against the database, possibly with logic to retry when a failure occurs.

System_CAPS_pubinterfaceIDbModelCacheKey

Represents a key value that uniquely identifies an Entity Framework model that has been loaded into memory.

System_CAPS_pubinterfaceIDbModelCacheKeyProvider

Implement this interface on your context to use custom logic to calculate the key used to lookup an already created model in the cache. This interface allows you to have a single context type that can be used with different models in the same AppDomain, or multiple context types that use the same model.

System_CAPS_pubinterfaceIDbProviderFactoryResolver

A service for obtaining the correct DbProviderFactory from a given DbConnection.

System_CAPS_pubinterfaceIManifestTokenResolver

A service for getting a provider manifest token given a connection. The DefaultManifestTokenResolver class is used by default and makes use of the underlying provider to get the token which often involves opening the connection. A different implementation can be used instead by adding an IDbDependencyResolver to DbConfiguration that may use any information in the connection to return the token. For example, if the connection is known to point to a SQL Server 2008 database then "2008" can be returned without opening the connection.

System_CAPS_pubinterfaceIMetadataAnnotationSerializer

Implement this interface to allow custom annotations represented by MetadataProperty instances to be serialized to and from the EDMX XML. Usually a serializer instance is set using the SetMetadataAnnotationSerializer method.

System_CAPS_pubinterfaceIObjectContextAdapter

Interface implemented by objects that can provide an ObjectContext instance. The DbContext class implements this interface to provide access to the underlying ObjectContext.

System_CAPS_pubinterfaceIProviderInvariantName

Used by IDbDependencyResolver and DbConfiguration when resolving a provider invariant name from a DbProviderFactory.

EnumerationDescription
System_CAPS_pubenumDbConnectionStringOrigin

Describes the origin of the database connection string associated with a DbContext.

Return to top
Show:
© 2015 Microsoft