Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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'. 

And when I take a look at my Table in the Server Explorer, I don't find the attribut Color although I wrote it in my Model class.

What I have tried:

I try to enable the migration using PM .
Posted
Comments
David_Wimbley 22-Aug-17 12:20pm    
Are you using code first or database first EF?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900