Entity Framework does not (currently) support modifying an existing database. It can only drop/recreate the database. You will need to add the tables from the database side that match your POCO classes.
Please mark as answered if this helped.
Marked as answer by dvsspr on Apr 21, 2011 04:11 AM
dvsspr
Member
73 Points
43 Posts
EF 4.1 Code First - schema creation on the existing database
Apr 20, 2011 03:47 AM|LINK
I am intending to add tables to a database which is created by SqlMembershipProvider class.
How do I tell the framework to add tables (which are based on my POCO classes) to that database?
My motive in using one database is I want to maintain referential integrity between tables those contain user id field.
chohmann
Star
9385 Points
1644 Posts
Re: EF 4.1 Code First - schema creation on the existing database
Apr 20, 2011 07:47 PM|LINK
Entity Framework does not (currently) support modifying an existing database. It can only drop/recreate the database. You will need to add the tables from the database side that match your POCO classes.