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

System.Data.Entity Namespace

 

The System.Data.Entity namespace contains classes that provides access to the core functionality of the entity framework.

ClassDescription
System_CAPS_pubclassCreateDatabaseIfNotExists<TContext>

An implementation of IDatabaseInitializer that will recreate and optionally re-seed the database only if the database does not exist. To seed the database, create a derived class and override the Seed method.

System_CAPS_pubclassDatabase

An instance of this class is obtained from an DbContext object and can be used to manage the actual database backing a DbContext or connection. This includes creating, deleting, and checking for the existence of a database. Note that deletion and checking for existence of a database can be performed using just a connection (i.e. without a full context) by using the static methods of this class.

System_CAPS_pubclassDbConfiguration

A class derived from this class can be placed in the same assembly as a class derived from DbContext to define Entity Framework configuration for an application. Configuration is set by calling protected methods and setting protected properties of this class in the constructor of your derived type. The type to use can also be registered in the config file of the application. See http://go.microsoft.com/fwlink/?LinkId=260883 for more information about Entity Framework configuration.

System_CAPS_pubclassDbConfigurationTypeAttribute

This attribute can be placed on a subclass of DbContext to indicate that the subclass of DbConfiguration representing the code-based configuration for the application is in a different assembly than the context type.

System_CAPS_pubclassDbContext

A DbContext instance represents a combination of the Unit Of Work and Repository patterns such that it can be used to query from a database and group together changes that will then be written back to the store as a unit. DbContext is conceptually similar to ObjectContext.

System_CAPS_pubclassDbContextTransaction

Wraps access to the transaction object on the underlying store connection and ensures that the Entity Framework executes commands on the database within the context of that transaction. An instance of this class is retrieved by calling BeginTransaction() on the DbContextDatabase object.

System_CAPS_pubclassDbFunctionAttribute

Indicates that the given method is a proxy for an EDM function.

System_CAPS_pubclassDbFunctions

Provides common language runtime (CLR) methods that expose EDM canonical functions for use in DbContext or ObjectContext LINQ to Entities queries.

System_CAPS_pubclassDbModelBuilder

DbModelBuilder is used to map CLR classes to a database schema. This code centric approach to building an Entity Data Model (EDM) model is known as 'Code First'.

System_CAPS_pubclassDbModelBuilderVersionAttribute

This attribute can be applied to a class derived from DbContext to set which version of the DbContext and DbModelBuilder conventions should be used when building a model from code--also known as "Code First". See the DbModelBuilderVersion enumeration for details about DbModelBuilder versions.

System_CAPS_pubclassDbSet

A non-generic version of DbSet<TEntity> which can be used when the type of entity is not known at build time.

System_CAPS_pubclassDbSet<TEntity>

A DbSet represents the collection of all entities in the context, or that can be queried from the database, of a given type. DbSet objects are created from a DbContext using the DbContext.Set method.

System_CAPS_pubclassDropCreateDatabaseAlways<TContext>

An implementation of IDatabaseInitializer that will always recreate and optionally re-seed the database the first time that a context is used in the app domain. To seed the database, create a derived class and override the Seed method.

System_CAPS_pubclassDropCreateDatabaseIfModelChanges<TContext>

An implementation of IDatabaseInitializer that will DELETE, recreate, and optionally re-seed the database only if the model has changed since the database was created.

System_CAPS_pubclassMigrateDatabaseToLatestVersion<TContext, TMigrationsConfiguration>

An implementation of IDatabaseInitializer<TContext> that will use Code First Migrations to update the database to the latest version.

System_CAPS_pubclassNullDatabaseInitializer<TContext>

An implementation of IDatabaseInitializer<TContext> that does nothing. Using this initializer disables database initialization for the given context type. Passing an instance of this class to SetInitializer<TContext> is equivalent to passing null. When IDbDependencyResolver is being used to resolve initializers an instance of this class must be used to disable initialization.

System_CAPS_pubclassObservableCollectionExtensions

Extension methods for ObservableCollection<T>.

System_CAPS_pubclassQueryableExtensions

Provides useful extension methods for use with Entity Framework LINQ queries.

InterfaceDescription
System_CAPS_pubinterfaceIDatabaseInitializer<TContext>

An implementation of this interface is used to initialize the underlying database when an instance of a DbContext derived class is used for the first time. This initialization can conditionally create the database and/or seed it with data. The strategy used is set using the static InitializationStrategy property of the Database class. The following implementations are provided: DropCreateDatabaseIfModelChanges<TContext>, DropCreateDatabaseAlways<TContext>, CreateDatabaseIfNotExists<TContext>.

System_CAPS_pubinterfaceIDbSet<TEntity>

An IDbSet<TEntity> represents the collection of all entities in the context, or that can be queried from the database, of a given type. DbSet<TEntity> is a concrete implementation of IDbSet.

EnumerationDescription
System_CAPS_pubenumDbModelBuilderVersion

A value from this enumeration can be provided directly to the DbModelBuilder class or can be used in the DbModelBuilderVersionAttribute applied to a class derived from DbContext. The value used defines which version of the DbContext and DbModelBuilder conventions should be used when building a model from code--also known as "Code First".

System_CAPS_pubenumEntityState

Describes the state of an entity.

System_CAPS_pubenumTransactionalBehavior

Controls the transaction creation behavior while executing a database command or query.

Return to top
Show:
© 2015 Microsoft