I am newbie and confused how to do it.
I have built MVC 3 application in Visual Studio 2010 and published to the localhost and it's working fine.
Here, What I actually want is to use the Sql Server 2008 installed in my computer rather than database under the folder APP_DATA that I have created using visual studio.
I am new to the MVC and don't know about the database connection detailly. Following is the connection string of the web.config file:
<connectionStrings>
<add name="IVRControlPanelEntities" connectionString="metadata=res://*/Models.IVRControlPanelModel.csdl|res://*/Models.IVRControlPanelModel.ssdl|res://*/Models.IVRControlPanelModel.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\IVRControlPanelDB.mdf;integrated security=True;user instance=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
This is the connectionstring automatically added by the visual studio while adding the data entity model.
After published to localhost the database used by mvc 3 is under the APP_DATA folder of wwwroot folder.
What I need to change to connect to the Sql Server 2008 installed in my computer rather than database created on the Visual Studio.
One more thing, I could not import the database created by visual studio to the sql server 2008 which is in the form IVRControlPanelDB.mdf