1
Good morning,
I have a project using ASP.MVC
+ EF
and mapped about 20 tables using the VS wizard (creating the ADO.NET Entity Data Model
, selecting the database and the tables I want), but now I have 16 more tables to insert into the system and I can’t find an option to include them using automatic mapping (as in the first 20).
From what I’ve seen, some people indicate to exclude my class who owns the DbContext
(created from the ADO.NET Entity Data Model
) and recreate it, but I’m not sure if this is the ideal way, since the models at the beginning are already formatted with Data Annotations
and are used in various controllers.
Is there any way to map new tables using the Wizard of Entity Data Model
without the need to exclude DBContext
created in the first mapping?
I’m using Visual Studio Community 2017 and Code First from Database mode.
Hello, Marconcilio Souza! Thank you so much for your help. In the case I mentioned above, I don’t have . EDMX because I used EF Code First from Database - so I searched, EDMX is generated when using Designer Centric (Model First and Database First). Anyway, to solve my problem I created the models at hand. Maybe it wasn’t the most agile form, but I was able to learn some important covenants that I hadn’t noticed until then. Thank you so much for your willingness to help! Hug!
– jlopes