Xafari MVC App from Scratch
This topic describes how to create a new XAF application based on MVC using Xafari MVC toolkit.
In the beginning, make sure that Nuget Package Manager is installed. In the main menu of Visual Studio, select Help|About Microsoft Visual Studio, look through the list of installed products to find the needed component as shown in the picture below:
The next step is to modify some settings of NuGet Package Manager as follows:
- In the main menu, choose Tools|Options;
- In the opened dialog window, navigate to the NuGet Package Manager|General node;
- Set the flags to enable the options Allow NuGet to download missing packages and Automatically check for missing packages during build in Visual Studio as shown in the picture below:
After that, use the VS Template to create a new application:
- In the main Visual Studio menu navigate to File|New|Project… and open the New Project window;
- Go to Installed|Templates|Visual C#|Xafari and choose Xafari v.XX.X.XXXX ASP.NET MVC Application;
- Set the Name value and press OK as shown in the picture below:
Now you have a new project with the following structure:
Build the newly created project. While performing the Build command, the NuGet Package Manager module adds all missing component to the project by downloading the needed files.
Finally, open the Web application in the browser by calling for the Start Debugging command (or the F5 hotkey) to check if the application is working correctly. The example of the newly created application is shown in the picture below: