0

我已經更新了我的edmx文件,以便在數據庫中完成所做的更改。Table類從EntityFramework的DBcontext對象中消失

數據庫圖顯示新添加的表(RelyingParty)。 使用DBContext對象我試圖在我的DAL層執行操作,但表類不斷從代碼中消失/丟失。

最初,它是當前和今後一段時間,它說以後 - 「RelyingPart不是模型的一部分爲currentcontext

ERROR

我想什麼?

protected override void OnModelCreating(DbModelBuilder modelBuilder) 
{ 
     modelBuilder.Entity<RelyingParty>().ToTable("RelyingParty"); 
} 

In Entites.Context.cs class。我仍然面臨這個問題。

回答