Click here to Skip to main content
14,216,111 members
Rate this:
Please Sign up or sign in to vote.
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 .
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)

Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190619.2 | Last Updated 22 Aug 2017
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100