Microsoft.EntityFrameworkCore Microsoft.EntityFrameworkCore Namespace

Classes

A DbContext instance represents a session with the database and can be used to query and save instances of your entities. DbContext is a combination of the Unit Of Work and Repository patterns.

The options to be used by a DbContext. You normally override

OnConfiguring(DbContextOptionsBuilder) or use a DbContextOptionsBuilder to create instances of this class and it is not designed to be directly constructed in your application code.

The options to be used by a DbContext. You normally override

OnConfiguring(DbContextOptionsBuilder) or use a DbContextOptionsBuilder<TContext> to create instances of this class and it is not designed to be directly constructed in your application code.

Provides a simple API surface for configuring DbContextOptions. Databases (and other extensions) typically define extension methods on this object that allow you to configure the database connection (and other options) to be used for a context.

You can use DbContextOptionsBuilder to configure a context by overriding OnConfiguring(DbContextOptionsBuilder) or creating a DbContextOptions externally and passing it to the context constructor.

Provides a simple API surface for configuring DbContextOptions<TContext>. Databases (and other extensions) typically define extension methods on this object that allow you to configure the database connection (and other options) to be used for a context.

You can use DbContextOptionsBuilder to configure a context by overriding OnConfiguring(DbContextOptionsBuilder) or creating a DbContextOptions externally and passing it to the context constructor.

DbSet<TEntity>(Of TEntity)

A DbSet<TEntity> can be used to query and save instances of TEntity. LINQ queries against a DbSet<TEntity> will be translated into queries against the database.

The results of a LINQ query against a DbSet<TEntity> will contain the results returned from the database and may not reflect changes made in the context that have not been persisted to the database. For example, the results will not contain newly added entities and may still contain entities that are marked for deletion.

Depending on the database being used, some parts of a LINQ query against a DbSet<TEntity> may be evaluated in memory rather than being translated into a database query.

DbSet<TEntity> objects are usually obtained from a DbSet<TEntity> property on a derived DbContext or from the Set<TEntity>() method.

An exception that is thrown when a concurrency violation is encountered while saving to the database. A concurrency violation occurs when an unexpected number of rows are affected during save. This is usually because the data in the database has been modified since it was loaded into memory.

An exception that is thrown when an error is encountered while saving to the database.

Static methods that are useful in application code where there is not an EF type for the method to be accessed from. For example, referencing a shadow state property in a LINQ query.

Entity Framework LINQ related extension methods.

Extension methods for IEntityType.

Extension methods for IExecutionStrategy

In-memory specific extension methods for DbContextOptionsBuilder.

Extension methods for IKey.

Provides a simple API surface for configuring a IMutableModel that defines the shape of your entities, the relationships between them, and how they map to the database.

You can use ModelBuilder to construct a model for a context by overriding OnModelCreating(ModelBuilder) on your derived context. Alternatively you can create the model externally and set it on a DbContextOptions instance that is passed to the context constructor.

Extension methods for IModel.

Extension methods for IMutableAnnotatable.

Extension methods for IMutableEntityType.

Extension methods for IMutableKey.

Extension methods for IMutableModel.

Extension methods for IMutableNavigation.

Extension methods for IMutablePropertyBase.

Extension methods for IMutableProperty.

Extension methods for INavigation.

Extension methods for .

Extension methods for IPropertyBase.

Extension methods for IProperty.

Relational database specific extension methods for EntityTypeBuilder.

Relational database specific extension methods for IndexBuilder.

Relational database specific extension methods for KeyBuilder.

Relational database specific extension methods for metadata.

Relational database specific extension methods for ModelBuilder.

Relational database specific extension methods for PropertyBuilder.

Relational database specific extension methods for LINQ queries.

Relational database specific extension methods for ReferenceCollectionBuilder.

Relational database specific extension methods for ReferenceReferenceBuilder.

SQLite specific extension methods for DbContextOptionsBuilder.

SQLite specific extension methods for EntityTypeBuilder.

SQLite specific extension methods for IndexBuilder.

SQLite specific extension methods for KeyBuilder.

SQLite specific extension methods for metadata.

SQLite specific extension methods for PropertyBuilder.

SQLite specific extension methods for ReferenceCollectionBuilder.

SQLite specific extension methods for ReferenceReferenceBuilder.

SQL Server specific extension methods for DbContextOptionsBuilder.

SQL Server specific extension methods for EntityTypeBuilder.

SQL Server specific extension methods for IndexBuilder.

SQL Server specific extension methods for KeyBuilder.

SQL Server specific extension methods for metadata.

SQL Server specific extension methods for ModelBuilder.

SQL Server specific extension methods for PropertyBuilder.

SQL Server specific extension methods for ReferenceCollectionBuilder.

SQL Server specific extension methods for ReferenceReferenceBuilder.

Extension methods for ITypeBase.

Relational database specific extension methods for WarningsConfigurationBuilder.

Enums

The state in which an entity is being tracked by a context.

Indicates how the results of a query are tracked by the ChangeTracker.

The runtime behavior of warnings generated by Entity Framework