Share via


CoreStrings.DbContextMissingConstructor(Object) Method

Definition

'AddDbContext' was called with configuration, but the context type '{contextType}' only declares a parameterless constructor. This means that the configuration passed to 'AddDbContext' will never be used. If configuration is passed to 'AddDbContext', then '{contextType}' should declare a constructor that accepts a DbContextOptions<{contextType}> and must pass it to the base constructor for DbContext.

public static string DbContextMissingConstructor (object contextType);
public static string DbContextMissingConstructor (object? contextType);
static member DbContextMissingConstructor : obj -> string
Public Shared Function DbContextMissingConstructor (contextType As Object) As String

Parameters

contextType
Object

Returns

Applies to