Firebird Documentation IndexFirebird 3.0 Developer's GuideCreating Web Applications in Entity Framework with MVC → Creating a Project
Firebird Home Firebird Home Prev: Software StackFirebird Documentation IndexUp: Creating Web Applications in Entity Framework with MVCNext: Creating an EDM

Creating a Project

Table of Contents

Structure of the Project
Adding the Missing Packages

The Following topics will show how to use the Visual Studio wizards to create the framework of an MVC.NET application.

Open File—>New—>Project in Visual Studio 2015 and create a new project named FBMVCExample.

Figure 5.2. Create the FBMVCExample project

Create the FBMVCExample project


Figure 5.3. Change authentication setting

Change authentication setting


For now, we will create a web application with no authentication, so click the Change Authentication button to disable authentication. We will get back to this issue a bit later.

Figure 5.4. Disable authentication for now

Disable authentication for now


Structure of the Project

The project that you create will have virtually no functionality, but it already has its basic structure, described briefly in the following table:

Table 5.1. Basic Structure of the MVC Project

Folder or File Purpose
/App_Data folder Where private web application data, such as XML files or database files, are located.
/App_Start folder Contains some main configuration settings for the project, including the definitions of routes and filters.
/Content folder Static content goes in here, such as CSS files and images. It is an optional convention. You can store CSS files anywhere you want.
/Controllers folder Controller classes are saved here. It is an optional convention. You can store controller classes anywhere.
/Models folder View model and business model classes are saved here although it is better for all applications (except for the simplest ones) to define a business model in a separate project. It is an optional convention. You can store model classes anywhere you like.
/Scripts folder Stores the JavaScript libraries being used in the application. By default, Visual Studio adds jQuery libraries and several other popular JavaScript libraries. It is an optional convention.
/Views folder Stores the views and partial views. They are commonly grouped together in sub-folders name for the controllers they are connected with.
/Views/Shared subfolder Stores layouts and views not specific to one controller.
/Views/Web.config file Contains the configuration information that ensures that views are processed within ASP.NET and not by the IIS web server. Also contains the namespaces imported into views by default.
/Global.asax file The global class of an ASP.NET application. A configuration for a route is registered in the file with its code (Global.asax.cs). Also contains also any code that is supposed to be executed during the launch or termination of an application or when an unhandled exception arises.
/Web.config file The configuration file for the application.


Adding the Missing Packages

We will use the NuGet package manager to add the missing packages:

  • FirebirdSql.Data.FirebirdClient
  • EntityFramework (automatically added by the wizard)
  • EntityFramework.Firebird
  • Bootstrap (automatically added by the wizard)
  • jQuery (automatically added by the wizard)
  • jQuery.UI.Combined
  • Respond (automatically added by the wizard)
  • Newtonsoft.Json
  • Moderninzr (automatically added by the wizard)
  • Trirand.jqGrid

Note

Not all packages provided by NuGet are the latest version of the libraries. It is especially true for JavaScript libraries. You can install the latest versions of JavaScript libraries using a content delivery network (CDN) or by just downloading them and replacing the libraries provided by NuGet.

Right-click the project name in Solution Explorer and select the Manage NuGet Packages item in the drop-down menu.

Figure 5.5. Select Manage NuGet Packages

Select Manage NuGet Packages


Find and install the necessary packages in the package manager.

Figure 5.6. Select packages for installing

Select packages for installing


Prev: Software StackFirebird Documentation IndexUp: Creating Web Applications in Entity Framework with MVCNext: Creating an EDM
Firebird Documentation IndexFirebird 3.0 Developer's GuideCreating Web Applications in Entity Framework with MVC → Creating a Project