MVC3 Music Store Tutorial Connection String issue

前端 未结 3 989
离开以前
离开以前 2021-01-16 04:32

I\'m working my way through the MVC Music Store Tutorial and am running into an issue when I try to connect to the database using the entity framework model. I\'ve tried a

3条回答
  •  鱼传尺愫
    2021-01-16 05:14

    You could be missing the username and password from your conn string? Application and timeout are other parameters you might need depending on your set up. Check out http://www.connectionstrings.com for more help with SQL 2005.

    Furthermore, Entity Framework requires many more parameters in the connection string. I have not used the code first approach yet but if you have existing tables you wish to map then EF has a wizard you can use to identify the database objects you want to work with. To get this far you have to provide a valid connection string to the dialog. In doing so VS will populate your web.config with the well formed and fully constructed conn string for use with EF.

提交回复
热议问题