First, a couple of remarks:
I'm applying code first approach in the "Entity Data Model Wizard"
Code First means that there is no .edmx file. There are migration files and code mappings.
I read that after the Code First wizard, an app.config file should be
added to the project, but this file is missing
Not 100% sure here, but I guess that if your project already has a web.config
file it will be used instead of adding a new app.config
file (they are basically the same).
So, the thing is that you have to enable and use code migrations, you have to generate POCO classes for your entities (if you don't have them already), and you have to add a database context that extends DbContext
and includes DbSets
for your entities, and some database initialization code.
This page explains how to do the most difficult part of all of that: dealing with the code migrations. Although it assumes that you are migrating from an existing edmx model and using Power Tools you can just ignore that part and focus on the useful information about the migrations. That is, skip directly to Step 2 in the page.
About removing the views you imported, I guess you didn't get to the part where you generate the migrations, so probably you just have to delete the POCO classes created for the views, and possibly also remove the DbSets
added to your DbContext
for those entities.
If you generated some migration you can either generate a new migration or modify the existing one. This can be done by adding explicit Ignore
mappings for your view entities and running Add-Migration
again. If you didn't get to the migrations part yet just ignore this last paragraph.
Hope it helps.