XAF ships with the Solution Wizard, which allows you to quickly create a new application in a few simple steps. All you need to do is choose the target platform, data model type (Entity Framework Code First or eXpressPersistent Objects (XPO)), Security System settings, and Extra Modules to include in your application. The wizard will automatically generate a solution according to the specified settings.
The Solution Wizard is available using the File | New | Project... command in the Visual Studio main menu and using the Add | New Project... context menu command in the Solution Explorer. The C# template is located in the Visual C# | DevExpress XAF category. VB.NET — in the Visual Basic | DevExpress XAF category.
The wizard will add code that registers an appropriate Object Space Provider (see XafApplication.ObjectSpaceProvider). If you choose Entity Framework Code First, the wizard will generate the DbContext class code.
The wizard will add code that configures the Security System and populates the data model with the entities required to persist Security System data (users, roles and permissions). If you choose Standard authentication, it will also add code that creates the "Admin" user with an empty password to the Updater.cs (Updater.vb) file. If you choose Active Directory authentication, a similar code will be added, but the user name will be taken from your current Windows account.
In this last step, you can choose the XAF extra modules to include.
The wizard will register the selected modules and add the entities required by these modules to the data model.
The following image demonstrates the generated solution.
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 App.config and Web.config files of the WinForms/ASP.NET application projects. Refer to the Connect an XAF Application to a Database Provider topic for details about connecting to different database systems.
Add a Project to Existing XAF Solution
You can also run the Solution Wizard for an existing solution to crate additional XAF projects. Right-click the solution in the Solution Explorer, choose Add | New Project... and select DevExpress v19.2 XAF Solution Wizard. The image below shows the Wizard's start page in this case.
The table below lists the available projects and their descriptions.
WinForm Application Project
An XAF project for creating a desktop application.