This article explains how to set Connection
String in ASP.Net MVC 3 using Entity Framework in VB.NET.
The Sample ASP.NET MVC Application
After the installation of MVC Framework, then you go ahead and create an ASP.NET
MVC Web Application by using File -> New -> Project -> Web -> ASP.NET MVC web
Application.

Figure1
This will bring up the "New Project" dialog. To create a new ASP.NET MVC
application, we'll select the "Web" node on the left-hand side of the dialog and
then choose the "ASP.NET MVC Web Application" project template on the right.

Figure2
Now we click Ok Visual Studio will bring up an additional dialog, select
Internet Application. Leave Razor as the default view engine.

Figure3
Now add a new item 'ADO.NET Entity
Data Model'.

Figure4
Now generate model from database.

Figure5
Now choose data connection.

Figure6
Now click on the next Button.
Now open web configuration file
from solution explorer and add the following code.
<connectionStrings>
<add name="masterEntities"
connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider
connection string="Data Source=MCNDESKTOP12;Initial Catalog=master;User
ID=sa;Password=wintellect;MultipleActiveResultSets=True""
providerName="System.Data.EntityClient" />
</connectionStrings>
To see the connection string in
web configuration solution explorer->Web configuration file->right click->open.

Figure7