Skip to main content
A newer version of this page is available. .
All docs
V20.2

Create a Solution

  • 2 minutes to read

This lesson explains how to create a new XAF Blazor solution. After you complete this lesson, you will be able to run the application and see its default state.

Step-by-Step Instructions

  1. In Visual Studio, create a new project. Select the DevExpress v20.2 XAF.Blazor Solution Wizard and click Next. Specify the new solution’s name (“MySolution”) and location. Then, click Create.

    Tutorial_BMD_Lesson1_1

  2. The Solution Wizard opens. In the next screen, choose eXpress Persistent Objects, and click Next.

    CTutor_Solution_Wizard_2

    Note

    You can use Entity Framework (EF) or eXpress Persistent Objects (XPO) as your project’s object-relational mapping (ORM) tool. This tutorial uses XPO. Note that Audit Trail extra module do not support Entity Framework. To use this module, choose XPO. Otherwise, proceed with either ORM.

  3. In the next screen, you can choose the security options of your application. Choose a Standard authentication type and click Next.

    CTutor_Solution_Wizard_3_XPO

  4. In the next screen, you can choose the XAF modules, which are automatically added to your application. Click Finish.

    CTutor_Solution_Wizard_4

    The newly created solution contains the following projects:

    • MySolution.Blazor.Server - the Blazor application project, which automatically generates the Blazor CRUD user interface. This project depends on the MySolution.Module and MySolution.Module.Blazor modules. Do not use this project for feature implementation. All application logic should be implemented in the appropriate Module projects.
    • MySolution.Module - the basic module project that contains platform independent code.
    • MySolution.Module.Blazor - the module project that contains code specific to the Blazor application.

    Tutorial_BMD_Lesson1_2

    Refer to the Application Solution Structure topic for information on the XAF solution structure.

    Note

    The wizard attempts to detect your installed SQL server and changes the connection string accordingly. Supported servers are Microsoft SQL Server (including the Express and LocalDB editions). To use another database system (PostgreSQL, MySQL, Oracle, SQLite, Firebird, etc.), change the ConnectionString argument in the appsettings.json file. Refer to the Connect an XAF Application to a Database Provider topic for details about connecting to different database systems.

  5. You can now run the application. Click Start Debugging or press F5.

    The following images show the resulting Blazor application. Use the “Admin” user name with an empty password to log in.

    Tutorial_BMD_Lesson1_3

     

    Tutorial_BMD_Lesson1_4

Next Lesson

Business Model Design with XPO

See Also