Note: This topic applies to the MVC Web Application project type only. Refer to Creating an MVC Web Application for more information.
Scaffolding is the technique used to generate the presentation code that the application can use at run time. The generated code represents a useful starting point for your application that you may want to further modify to refine the application.
Refer to the following topics for more information:
To scaffold one or more data sources in your presentation project, do the following:
Click Build and select Build Solution to build the solution.
In Solution Explorer, navigate to an MVC project. If you are using MVC areas, navigate to the correct area folder (for example Areas/<areaname>, where <areaname> is the name of your area).
Note: An Area is a logical grouping of Controller, Models, and other related folders in a Web API application. Areas are an optional feature in ASP.Net MVC. For an example, refer to https://msdn.microsoft.com/en-us/library/ee671793(v=vs.100).aspx.
Right-click the project or area folder and select Add, then select New Scaffolded Item.
The Add Scaffold dialog opens.
On the Add Scaffold dialog, select Unisys Controller for ePortal Data Source and click Add.
The Scaffold Unisys Controller for ePortal Data Source Dialog opens.
Complete the dialog as described below.
After completing the dialog fields, click OK to start scaffolding.
Note: If scaffolding would overwrite any existing files, you are given a chance to confirm before overwriting.
Dialog Fields
The dialog fields are described below:
ePortal Data Source
Select the name of the data source to scaffold from the dropdown list.
Note: If you do not see the data source project you are looking for, ensure that the data source project is opened in the current solution and a reference has been added. Refer to Using Multiple Data Source Projects for more information.
Controller name
Specify a name for the controller. This name is used as follows:
The name of the controller class is formed by appending “Controller” to the name you specify.
A file named <controllername>Controller.cs is created in the Controllers folder, where <controllername> is the controller name that you specify.
Any views that you scaffold appear under the Views/<controllername> folder, where <controllername> is the controller name that you specify.
The URL to reference this controller at run time is of the form http://<host>:<port>/<controllername>, where <host> is the IP address or DNS name of the server hosting your application (for example, localhost for local testing), <port> is the port number for the web server, and <controllerame> is the controller name that you specify. Refer to Testing an MVC Web Application for more information.
Generate Web Application as a Single Page Application (AJAX)
Select this option if you want to use the ePortal Single Page Application architecture for your application. Refer to the topic Choosing a Traditional or Single Page Application.
Controller scaffolder
Select the scaffold template to use to generate the controller code from the dropdown list, or none to omit scaffolding the controller. Refer to Scaffold Templates and Creating Custom Scaffold Templates for more information.
Entire application requires HTTPS
Select this option if the entire application requires HTTPS (for example, a secure connection using SSL or TLS).
Require HTTPS on specified messages
Select this option if you wish to override the previous setting for individual client messages. In this case, you should configure the property RequireHTTPS on individual client or server messages. Refer to Message Editor Root Node Properties for more information.