Database Reference
In-Depth Information
Figure 4-3. Selecting a project template for an ASP.NET MVC application
A new project is created in Visual Studio IDE with number of default files and folders.
Now we have to set up the database for this application. We will use a MyStore .mdf file database within our
project to make everything simple and clear.
An MDF file-based database can easily be created within the Visual Studio development environment. This
MDF file-based database can then be attached to a SQL Server Express instance and used as a normal, full-fledged
database. The difference here is that it is attached through a connection string and not as a permanently attached
database onto a SQL Server instance.
Right click on the App_Data folder to add a new .mdf file. This file can be added in two ways: either click on New
Item in the Add context menu, as shown in Figure 4-4 , or click on SQL Server Database entry, as shown in Figure 4-5 .
 
Search WWH ::




Custom Search