The database initializers provided by the .NET Framework have the basics covered, but there are often good reasons to create your own. You might want the decision to create a new database to be more sophisticated, or based on user input. You might want to check alternate loctaions before making the decision. Or you might want to leverage the
Seed() method provided by the existing concrete classes to add some core data to the dictionary when it’s created. Here’s how:
Add the initializer class to your project
You’ll typically add the class to the data access layer. If you’re not going to be seeding data, you can implement ...