by default where the data is stored in mvc 3
simply i take mvc 3 project then add model "class1" in that there is another class "person" in class1 there i开发者_开发问答s two properties id,name and in class person i inherits dbcontext class and it contains
"public DbSet classes { get; set; }"
and i take default1controller with read/write actions and views, using entity framework and set model class "class1" and data context class "person" so now my program runs successfully and i can insert the data but i don't know that where it stores the data. plz help me.
It might use SQL Server Compact which stores data in a file inside the ~/App_Data
folder.
I've not yet used MVC 3 but have a look at your Visual Studio solution. See if there is an App_data folder and expand that. In there you might see an MDF database. Chances are the data is stored in there.
The only thing that I would add to @ManishG's comment:
it stores the data in my local sqlexpress
is that, for connecting to a sqlexpress instance, you should put (local)\SQLEXPRESS in the Server Name field if you are creating a connection from VS 2010 Server Explorer.
精彩评论