DataSource for Entity Framework in WPF
C1.Data.Entities Namespace / EntityClientCache Class / RegisterContext Method / RegisterContext(DbContext) Method
An DbContext to set as default.

In This Topic
    RegisterContext(DbContext) Method
    In This Topic
    Registers an DbContext as a default for C1DataSource controls.
    Syntax
    'Declaration
     
    Public Overloads Shared Function RegisterContext( _
       ByVal context As DbContext _
    ) As IDisposable
    public static IDisposable RegisterContext( 
       DbContext context
    )

    Parameters

    context
    An DbContext to set as default.

    Return Value

    An System.IDisposable to unregister the context.
    Exceptions
    ExceptionDescription
    Another context is already registered.
    Remarks
    Use this method when you need to customize the default DbContext used in C1DataSource controls. Register a custom DbContext on startup before any C1DataSource instances are created.
    See Also