The connection string 'MyConnection' in the application's configuration file does not contain the required providerName attribute."

前端 未结 4 2185
傲寒
傲寒 2020-12-13 16:57

I use Entity Framework Code First,

My connection string is in a configuration file:


    
    <         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-13 17:22

    Go down in your web.config until you reach the providers tag. For instance, here's my providers statement:

    
    

    you should add this System.Data.SqlClient as a provider name in your connection string so your connection string should look like this:

      
     
      
    
    

提交回复
热议问题