CoreStrings.DbContextMissingConstructor(Object) Methode

Definition

'AddDbContext' wurde mit der Konfiguration aufgerufen, aber der Kontexttyp '{contextType}' deklariert nur einen parameterlosen Konstruktor. Dies bedeutet, dass die an "AddDbContext" übergebene Konfiguration nie verwendet wird. Wenn die Konfiguration an "AddDbContext" übergeben wird, sollte "{contextType}" einen Konstruktor deklarieren, der einen DbContextOptions<{contextType}> akzeptiert und an den Basiskonstruktor für DbContext übergeben muss.

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

Parameter

contextType
Object

Gibt zurück

Gilt für: