This project is read-only.

How to update a .sdf database in mvc

Mar 5, 2013 at 12:06 PM

I am new to MVC. I created a sample MVC4 project.
Added a model class with objects Id, Name, Desc and Order Date.
Also created a datacontext, OrderItemDbContext in the same class.
Created a .sdf database by right clicking App_Data folder and created a table with
Id, Name, Desc and OrderDate.
Then created a controller class with scaffolding options as MVC controller with read/write
actions and views, using EF and set the Model class and the DataContext class.
Created a strongly typed view specifying the model class. When I run the app, I can add,delete
the items, but the OrderItemDbContext.mdf is getting updated, not the .sdf file.

Can anyone pls tell me how to connect to .sdf db.
Mar 6, 2013 at 4:20 PM
I'm not sure why you ask this question here?
The is the discussion page for the MVC forum project, if you have questions about ASP.NET or ASP.NET MVC, please visit the ASP.NET site