0

テーブルに列を追加するのに問題があります。単純に見えるので、このエラーが発生する理由がわかりません。SQL で列を追加するには、次のクエリを使用しました。

ALTER TABLE [Trades]
ADD level nvarchar(max)

追加したモデルに追加するには:

    public string level { get; set; }

パブリック クラス トレードへ。

問題は何ですか?

編集:ここに完全なエラーがあります:

Invalid column name 'level'. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'level'.

Source Error: 
Line 20:         {
Line 21:             ViewBag.Name = Name;
Line 22:             return View(db.Movies.ToList());
Line 23:         }
Line 24: 
4

1 に答える 1