Create a Solution (XPO)
- 2 minutes to read
This lesson creates a new XAF solution and guides you through the XAF Solution Wizard. In the Wizard, you will do the following:
- Add a Blazor UI project to the solution.
- Select an ORM tool to use for data management.
- Turn on user authentication.
- Review available built-in modules and enable the Validation module.
At the end of this lesson, you can run the application for the first time.
Step-by-Step Instructions
From Visual Studio’s main menu, select File | New | Project… to invoke the Create a new project dialog.
Select DevExpress v22.1 XAF Template Gallery and click Next. Specify the project’s name (“MySolution”) and click Create.
In the invoked Template Gallery window, switch to the .NET Core section. Select XAF Solution Wizard (.NET Core) and click Run Wizard.
On the first page of the Solution Wizard, you can select the target platform. Since this tutorial only demonstrates the Blazor UI, select the Web (ASP.NET Core Blazor) option and click Next.
Choose the DevExpress eXpress Persistent Objects ORM library.
Choose the authentication type for your application. In this tutorial, we use Standard. Click Next.
Select the ready-to-use XAF modules you want to add to your application. This tutorial requires the Validation module. Click Finish.
The solution contains the following projects:
- MySolution.Blazor.Server - the ASP.NET Core Blazor application project that automatically generates the ASP.NET Core Blazor CRUD user interface. This project depends on the MySolution.Module.
MySolution.Module - the module project that contains platform-independent code.
Refer to the Application Solution Structure topic for information on the XAF solution structure.
You can now run the application. Click Start Debugging or press F5.
The following images show the resulting ASP.NET Core Blazor application. Log in as “Admin” and use an empty string as the password.
Initial Connection to Database
The wizard attempts to find the installed Microsoft SQL Server instance (LocalDB or Express) and sets the connection string accordingly.
Refer to the Connect an XAF Application to a Database Provider topic for details on how to connect to different database systems.
Next Lesson
Inherit from the Business Class Library Class (XPO)