All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

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

Inherit from the Business Class Library Class (XPO).

See Also