Anouar2002 Ответов: 0

Проблема добавление нового атрибута в модель в ASP MVC EF


Hello everyone,

I am using ASP MVC with Entity Framework.

I have created a table "Voiture" which has "Modele","Marque","Construction Date" and "Price" as attributs. When I am trying now to add a new attribut "Color" to this Table, I get always an exception :

<pre>Invalid column name 'Color'.

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 'Color'. 

И когда я смотрю на свою таблицу в Проводнике сервера, я не нахожу цвет атрибута, хотя я написал его в своем классе модели.

Что я уже пробовал:

Я пытаюсь включить миграцию с помощью PM .

David_Wimbley

Вы используете код, первый или базу данных, впервые эф?

0 Ответов