阅读背景:

在EntityFramework中为MySql设置提供程序和连接字符串

来源:互联网 

I am using Entity Framework and in my solution there are 9 projects and it will enlarge. My problem is stating connection string in .config file. When I did like this, I had to state connection string for 4-5 projects and when I wanted to change my connection, changing ConnectionStrings is becoming an obligation for 4 or 5 projects. I want to set connection string in DbContext constructor. DbContext can provide me this ability but I can't define providerName.So dbconnection of context automatically use SqlClient but I want to use MySql provider. My connection string is :I am using Entity Framework and in my solution




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: