How to add entity framework 6 provider in code?

后端 未结 1 1587
忘了有多久
忘了有多久 2021-02-20 11:16

I use Entity Framework 6 in a C# application and it works perfectly. When creating the Model, the app.config is generated with all the necessary configuration. Now I don\'t like

1条回答
  •  温柔的废话
    2021-02-20 11:31

    In EF6 you can use Code Base configuration. Take a look at this article for more details. It shows how to set the default connection factory (use the SetDefaultConnectionFactory method). To set the provider you use the SetProviderServices method.

    0 讨论(0)
提交回复
热议问题