Entity Framework Code First Options
Is the database migration automatically written to match all class properties, or can I use a general class and then pick which properties I wish to be included in the db? How do I manage classes as table objects? Does each model become a table?

Rollin ShultzPosted Feb 12, 2015, 9:46 AM
Jignesh TrivediPosted Feb 11, 2015, 11:10 PM
Hi,
No
Each model does not become a DB table, If you decorated them with "Table" attribute or define dbset property in context class then it become DB table.
Generally db table name and column name is same as model class name and properties name but we can change also.
Please refer
https://msdn.microsoft.com/en-us/magazine/hh126815.aspx
hope this will help you.
Suraj SahooPosted Feb 11, 2015, 2:21 PM
http://www.google.co.in/url?q=http://www.entityframeworktutorial.net/code-first/entity-framework-code-first.aspx&sa=U&ei=z6rbVIn4A4zluQT6poHgBg&ved=0CAsQFjAA&usg=AFQjCNHXrGApef8mPSHLY8B5kkpoArcnLQ
What happens is you create a class with properties and you specify the id or primary key with key attribute. Thus when enable migration is done it creates the migration which picks the classes and its properties and on update database the tables are created based on the connection strings.
accept if helps
thanks