asp.net mvc Invalid value for key 'attachdbfilename'

后端 未结 9 1551
野趣味
野趣味 2020-12-10 05:50

I am currently reading Manning\'s \"ASP.NET MVC 4 in Action\" book and trying to get the first example to work.

Within my test application, I built a simple Model a

9条回答
  •  有刺的猬
    2020-12-10 06:30

    You are using SQL Server Compact 4.0:

    Be sure you have installed SQL Server Compact 4.0.

    Install VS 2010 SP1 Tools for SQL Server Compact.

    Change your connection string to:

      
         
      
    

    Right click on controllers folder and -> add -> controller

    Type:

    YourController
    MVC-Controller with read/write ...
    MyModel
    new datacontext -> APP.Models.DatabaseContext
    

提交回复
热议问题