Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[FourGameApp.Data.DataContext]' while attempting to activate 'FourGameApp.Data.DataContext'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
Beim Versuch, einen Befehlsdotnet -EF -Migrationen auszuführen, fügen Sie initial .
using FourGameApp.Entities;
using Microsoft.EntityFrameworkCore;
namespace FourGameApp.Data
{
public class DataContext : DbContext
{
public DataContext(DbContextOptions options) : base(options) { }
public DbSet Games { get; set; }
}
}
Ich bin auf den folgenden Fehler gestoßen: < /p> [code]Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[FourGameApp.Data.DataContext]' while attempting to activate 'FourGameApp.Data.DataContext'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728 [/code] Beim Versuch, einen Befehlsdotnet -EF -Migrationen auszuführen, fügen Sie initial .[code]using FourGameApp.Entities; using Microsoft.EntityFrameworkCore;
namespace FourGameApp.Data { public class DataContext : DbContext { public DataContext(DbContextOptions options) : base(options) { } public DbSet Games { get; set; } } } [/code]
Ich versuche derzeit, einen Einheit /Integrationstest zu schreiben, indem ich den Anbieter von Memory -Datenbank unter Verwendung eines Memory -Datenbankanbieters zu schreiben habe. Entity Framework...
Ich habe eine benutzerdefinierte Appsettings-JSON-Datei, die ich zur Konfiguration hinzufügen muss. Ich mache dies im Hook „ConfigureAppConfiguration“, der von „CreateHostBuilder“ aufgerufen wird und...
Ich verwende die AFNetworking -Version „2.5.4“ und erstelle eine multipartform-data -Anfrage.
In meinem Fall funktioniert der Code unter iOS8 einwandfrei, aber unter iOS 7 gibt es ein Problem. Es...