Create an XAF Application
- 2 minutes to read
This topic describes how to use the Solution Wizard to create XAF applications and specify a connection string.
Create the WinForms and ASP.NET Web Forms Applications
From the Visual Studio main menu, select File | New | Project… to invoke the New Project dialog.
Select DevExpress v21.2 XAF Template Gallery for C# or Visual Basic and click Next.
Specify the new solution’s name (“SimpleProjectManager”) and click Create.
In the invoked Template Gallery, select XAF Solution Wizard (.NET Framework) in the .NET Framework section and click Run Wizard.
Choose the target platform(s) on the Solution Wizard‘s first page. You can create separate WinForms, ASP.NET Web Forms applications, or multiple applications at once. Choose the Windows and Web platforms and click Next.
Choose Entity Framework 6 and eXpress Persistent Objects and click Next.
Note
You can use the Entity Framework 6 (EF 6) or eXpress Persistent Objects (XPO) as your project’s object-relational mapping (ORM) tool. This tutorial demonstrates the Entity Framework 6 and XPO-based approaches. Two ORMs are selected simultaneously for demo purposes. Real-world applications usually use one ORM.
You can choose security options for your application. Choose None as the Authentication type. This tutorial does not show how to use the XAF Security System.
Click Finish.
The Solution Wizard creates a solution with the following projects:
Refer to the Application Solution Structure topic for more information on projects an XAF solution contains.
Specify the Database Connection
The XAF applications use the MSSql Server LocalDB database with the following connection string:
"Integrated Security=SSPI;Pooling=false;Data Source=(localdb)\v11.1;Initial Catalog=SimpleProjectManager"
You can modify this connection string in the SimpleProjectManager.Win\App.config and SimpleProjectManager.Web\Web.config files (refer to the connectionStrings element). See the Connect an XAF Application to a Database Provider topic for more information.
At this stage, you can run the WinForms and ASP.NET Web Forms applications with automatically created navigation, menu, and other UI elements for line-of-business (LOB) applications. However, the business model and logic are not defined yet - this is implemented in the following topics.
Next topic: Define the Logical Data Model and Relationships