Tuesday, 17 September 2013

How to prevent DbContext from altering the database?

How to prevent DbContext from altering the database?

I'm learning Entity Framework (currently using EF6 beta) and I'm using the
code first pattern on an existing database. The entities and DbContext
class are created automatically using a T4 template.
I would like to prevent the DbContext from creating / altering anything
into the database at runtime.
How can I do that?

No comments:

Post a Comment