Show / Hide Table of Contents

    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 source

    GetDbSet<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.

    | Improve this doc View source

    SaveChanges()

    Saves all changes made in this context to the database.

    Declaration
    void SaveChanges()
    | Improve this doc View source

    SaveChangesAsync()

    Saves all changes made in this context to the database.

    Declaration
    Task SaveChangesAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini