DbContext Methods
Assembly: EntityFramework (in EntityFramework.dll)
| Name | Description | |
|---|---|---|
![]() | Dispose() | Calls the protected Dispose method. |
![]() | Dispose(Boolean) | Disposes the context. The underlying ObjectContext is also disposed if it was created is by this context or ownership was passed to this context when this context was created. The connection to the database ( DbConnection object) is also disposed if it was created is by this context or ownership was passed to this context when this context was created. |
![]() | Entry(Object) | Gets a DbEntityEntry object for the given entity providing access to information about the entity and the ability to perform actions on the entity. |
![]() | Entry<TEntity>(TEntity) | Gets a DbEntityEntry<TEntity> object for the given entity providing access to information about the entity and the ability to perform actions on the entity. |
![]() | Equals(Object) | Determines whether the specified DbContext is equal to the current DbContext.(Overrides Object.Equals(Object).) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | Returns the hash function for this DBContext.(Overrides Object.GetHashCode().) |
![]() | GetType() | Returns the type for the current DbContext. |
![]() | GetValidationErrors() | Validates tracked entities and returns a Collection of DbEntityValidationResult containing validation results. |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | OnModelCreating(DbModelBuilder) | This method is called when the model for a derived context has been initialized, but before the model has been locked down and used to initialize the context. The default implementation of this method does nothing, but it can be overridden in a derived class such that the model can be further configured before it is locked down. |
![]() | SaveChanges() | Saves all changes made in this context to the underlying database. |
![]() | SaveChangesAsync() | Asynchronously saves all changes made in this context to the underlying database. |
![]() | SaveChangesAsync(CancellationToken) | Asynchronously saves all changes made in this context to the underlying database. |
![]() | Set(Type) | Returns a non-generic DbSet instance for access to entities of the given type in the context and the underlying store. |
![]() | Set<TEntity>() | Returns a DbSet<TEntity> instance for access to entities of the given type in the context and the underlying store. |
![]() | ShouldValidateEntity(DbEntityEntry) | Extension point allowing the user to override the default behavior of validating only added and modified entities. |
![]() | ToString() | Returns the string representation of the DbContext.(Overrides Object.ToString().) |
![]() | ValidateEntity(DbEntityEntry, IDictionary<Object, Object>) | Extension point allowing the user to customize validation of an entity or filter out validation results. Called by GetValidationErrors. |

