Interface IDbContext
Abstracts the DbContext
functionality to allow for multiple and decoupled implementations.
Namespace: Silverback.Database
Assembly: Silverback.Core.dll
Syntax
public interface IDbContext
Methods
| Improve this doc View sourceGetDbSet<TEntity>()
Returns an IDbSet<TEntity> for the specified entity type.
Declaration
IDbSet<TEntity> GetDbSet<TEntity>() where TEntity : class
Returns
Type | Description |
---|---|
IDbSet<TEntity> | An IDbSet<TEntity>. |
Type Parameters
Name | Description |
---|---|
TEntity | The type of the entity. |
SaveChanges()
Saves all changes made in this context to the database.
Declaration
void SaveChanges()
SaveChangesAsync()
Saves all changes made in this context to the database.
Declaration
Task SaveChangesAsync()
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |