0
私は、.netコア2クラスライブラリを作成しました。エンティティとエンティティのタイプ構成を作成しました。私はアドオンの移行を実行しようとしているTemporaryDbContextFactory.netコア2クラスライブラリにEFコアマイグレーションを追加するには?
public class TemporaryDbContextFactory : IDesignTimeDbContextFactory<EFDBContext>
{
public EFDBContext CreateDbContext(string[] args)
{
var builder = new DbContextOptionsBuilder<EFDBContext>();
builder.UseSqlServer("Name=AppConnectionString",
optionsBuilder => optionsBuilder.MigrationsAssembly(typeof(EFDBContext).GetTypeInfo().Assembly.GetName().Name));
return new EFDBContext(builder.Options);
}
}
を作成した後、DbContextに
public class EFDBContext : DbContext
{
public EFDBContext(DbContextOptions options) : base(options)
{
}
}
を作成しましたが、私は何も得ませんでした。移行は作成されません
私はここで何が欠けていますか?
エラーが発生しましたか? – Entith
エラーはありません。コマンドは実行されましたが、移行は作成されません –