Question

How to add objects into an existing reverse engeneered model under Code First scenario with existing database? Suppose I have added ADO.NET Entity Data Model -> Code first from database. Then choose 20 tables out of say 350 from an existing database. And later I want to pick and add to my POCO-model more tables/objects. There is no option to add another object. I can recreate Data Model from scratch, but I'll have to choose all the tables I need, wich is obviously not convinient at all.

Était-ce utile?

La solution

The only semi-convenient way I've done this is by starting a new project with the same namespaces.....generate the "new" ones...then copy the .cs files over to my existing project, and copy lines of code for the mappings.

I don't think there is a "append-update" feature.

I would do the entire database (in the fake project)...and just have it "handy" for later....if you decided to bring in more items.

Sorry, its a poor-mans method, but just letting you know.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top