私は、Entity Frameworkを使用して、ビューのMVCコントローラを生成するための足場を使用しようとしている:コントローラの足場は、ASP.NETのCore 2プレビューのためにVS 2017のプレビューでは動作しません
私はApplicationDBContextを作成:
public class ApplicationDbContext : DbContext
{
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options)
{
}
public DbSet<med1.Models.House> House { get; set; }
}
とConfigureServicesに加え:
services.AddDbContext<Data.ApplicationDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
そしてもちろん、私は家のモデルがあります:
public class House
{
public int ID { get; set; }
public string HouseName { get; set; }
public string Address1 { get; set; }
public int CityID { get; set; }
public City City { get; set; }
public string ZIP { get; set; }
public int StateID { get; set; }
public State State { get; set; }
}
を私はエラー以下しまっ:
public ApplicationDbContext() { }
さて、私はApplicationDBContextにパラメータなしのコンストラクタを追加を。
実際に私は以前のプロジェクトで同じ問題があり、コントローラとビューを手動で作成しました。
しかし、このプロジェクトでは足場を使用したいと思います。
私は何か間違っているか、VS 2017プレビューの問題ですか?
のための問題を解決し、今私は他のエラーを持っていない: 『現在の環境(製造)のための構成で見つかった『HTTPS』という名前の証明書を』 – Alexan
アプリケーションでSSLを有効にしておく必要があります。。 – Sanket
これは既に開発済みですが、同じエラーが発生します – Alexan