In a project EF 6.1 was used with an existing database using 'Code First From Database' approach as descibed in this article http://msdn.microsoft.com/en-us/data/jj200620
Initially EF generated model classes, later some other classes were added to database and now I need to generate model classes for these new tables as well.
Please guide how I can do that without regenerating everything. Also instead of generating model classes for all tables, is there a way I can select tables to generate models for using same approach.
Go through the generation process, and during the generation process, it allows you to select tables. Select the newer ones only.
Instead of selecting all tables, expand the little triangle and select what you need. You also will have to select any dependent tables, or else the process will fail. If those dependent tables are already there, just delete the new code (unfortunately for them, there is no way to avoid generation).
There are some more tricks outlined in this here: Reverse engineering a subset of tables for Entity Framework
One more option is just delete the auto generated classes from the project and once again generate them. While following this approach only thing we need to make sure that is, we should give the same name for the data model(class name which inherits from DbContext ) as the previous one.Data model name is highlighted in below snap.