I'm pretty new to Entity Framework, and I might be having a hard time "asking the right question" on google. So i'll try here.
First some facts:
- I'm working on a project based on the Entity Framework 6.x.
- I'm using the Model First approach.
- The database is an SQL Server.
My challenge:
Every time my Unit Tests run, I'm dropping creating and seeding a test database using the DropCreateDatabaseAlways<TContext>
implementation. The Data Source is an (localdb)\v11.0 instance.
I've gotten to a point where I would like to map an entity to a database view. I can find plenty of material on how easy it is to do the mapping, but what I'm looking for is a way for the view to be applied to my test database upon database creation/initialization?
I'm trying to keep a pure Model First approach. Can anyone help with information on how the views (and Stored Procedures) can be created, when creating the database?