I have a database first data model, which I would like use to create an empty code first database to fill it with test data for unit testing purposes. How do I do that? When I'm trying to create a database, I get an 'UnintentionalCodeFirstException'.
My connection string looks like this:
<add name="MyDBEntities"
connectionString="metadata=http://res*/DataModel.csdl|res*/DataModel.ssdl|res*/DataModel.msl;provider=System.Data.SqlClient;provider connection string="data source=(localdb)\v11.0;initial catalog=MyDB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
Aucun commentaire:
Enregistrer un commentaire