Show / Hide Table of Contents

    Class SilverbackBuilderUseDbContextExtensions

    Contains the UseDbContext extension for the ISilverbackBuilder.

    Inheritance
    object
    SilverbackBuilderUseDbContextExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Microsoft.Extensions.DependencyInjection
    Assembly: Silverback.Core.EFCore30.dll
    Syntax
    public static class SilverbackBuilderUseDbContextExtensions

    Methods

    | Improve this doc View source

    UseDbContext<TDbContext>(ISilverbackBuilder)

    Registers the specified DbContext to be used as underlying storage for the services requiring it.

    Declaration
    public static ISilverbackBuilder UseDbContext<TDbContext>(this ISilverbackBuilder builder) where TDbContext : DbContext
    Parameters
    Type Name Description
    ISilverbackBuilder builder

    The ISilverbackBuilder to add the DbContext to.

    Returns
    Type Description
    ISilverbackBuilder

    The ISilverbackBuilder so that additional calls can be chained.

    Type Parameters
    Name Description
    TDbContext

    The type of the DbContext to be used.

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