O'Reilly logo

Fluent Entity Framework by Rebecca M. Riordan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Initializers

Back on page 201, I showed you a snippet for the static (Shared in Visual Basic) Database.SetInitializer() method that told Entity Framework to always re-create the database when the application runs. I’m sure that when you saw it you figured that there were other options, and you were right. In fact, there are three provided by Entity Framework, and you create others if you need to.

Image

Image On Your Own

Here’s an easy one: Write a statement that will tell Entity Framework to only create a physical database if it doesn’t find one already. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required