Click here to Skip to main content
16,007,885 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi
I have download the sample project from the website (Visual studio and MS sql server 2008 with mvc2 framework.I am new to MVC so need some help . I have all the source files and sql scripts. I have to deploy in my local enviroment .But i dont know how to set up ,execute &to connect the database to asp.net mvc.please help me...
Posted

If you are learner and starting with MVC then you should go with MVC 4(Preview) or MVC 3.0.

Or you can download MVCMusicStore

-Sagar Solanki
 
Share this answer
 
hi

Able to open the asp.net mvc project from Visual SVN.For Database Connection i tried to edit the web config file,but amnot able to open the web config file its says it can be moved, renamed,or deleted.
without the web config file , i execute the project & it creates one web config file with two option (release & Dedug mode files).Inside the web config file there is no connection string content to connect the db. please tell me to restore the default web config file.
Please help me....
 
Share this answer
 
Create the database on your SQL server. Open SQL management studio, then File->Open and Execute the SQL script to create the database. This is just standard database creation stuff

Now make a note of your local SQL server name. It should be something like

YOURMACHINE or YOURMACHINE\SQLEXPRESS

Open up the MVC application in visual studio, goto your web.config file. Have a look in there for the ConnectionStrings section, amend whatever connection string is in there to have your SQL Server details.

That's pretty much it! There's nothing different here just because it's MVC, you just need to create your database and tell your code how to connect to it
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900