Keyword not supported: 'metadata'.? with Sql Connection in Entityt Framework with MVC3

后端 未结 4 1720
时光取名叫无心
时光取名叫无心 2020-12-15 19:51

I am using Entity Framework 4 with my Asp.Net MVC3 application. My problem is that I am using Entity Framework to perform action with my database , That i

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-15 20:38

    The connection string for ADO.NET (in this case SqlConnection) doesn't take that format. You're using the one specific for Entity Framework. The ADO.NET one should be something like:

    "data source=KAPS-PC\KAPSSERVER;initial catalog=vibrant;integrated security=True"
    

    So, to sum it up, you need two separate connection strings, one for EF and one for ADO.NET

提交回复
热议问题