EPR类企业管理系统

在我们现有系统基础上或全新开发,提供定制服务
为您的企业高效快速实施ERP,WMS,MES,CRM管理系统
全面管控物料仓库、销售业务、采购业务、仓库业务
生产过程、质量检验、组织架构、业务报表


定制
QQ:460-3528

开发
QQ群:3360-90194

源码
微信:136-3650-3721

Visual Studio解决方案向导

XAF随附了解决方案向导,它使您可以通过几个简单的步骤快速创建新的应用程序。您需要做的就是选择目标平台,数据模型类型(实体框架代码优先或eXpressPersistent对象(XPO)),安全系统设置以及要包含在应用程序中的其他模块。该向导将根据指定的设置自动生成解决方案。

注意

您可以在DevExpress YouTube频道上找到“解决方案向导”视频教程:DevExpress XAF:解决方案向导

解决方案向导可使用文件| 新增| Visual Studio主菜单中的Project ...命令,并使用Add | 解决方案资源管理器中的“新建项目...”上下文菜单命令。在C#模板位于Visual C#中| DevExpress XAF类别。VB.NET鈥在Visual Basic中| DevExpress XAF类别。

解决方案向导模板

提示

您也可以从DevExpress模板库运行解决方案向导。要查找向导,请在“平台”组合框中选择“ XAF ”。

步骤1-选择目标平台

在此步骤中,您可以一次选择WindowsWebMobile(维护模式)或多个应用程序。

CTutor_Solution_Wizard_1

该向导将添加所需的特定于平台的应用程序和模块项目。

步骤2-选择ORM

在此步骤中,您可以选择数据模型类型-实体框架代码优先eXpress持久对象(XPO)。

SolutionWizard_Step2

该向导将添加用于注册适当的对象空间提供程序的代码(请参见XafApplication.ObjectSpaceProvider)。如果选择Entity Framework Code First,则向导将生成DbContext类代码。

提示

您也可以使用CTRL click选择EF和XPO(实体框架代码优先,再加上eXpress持久对象)。在这种情况下,向导将生成与“如何:在单个应用程序中同时使用实体框架和XPO”示例中的解决方案类似的解决方案。

步骤3-启用安全系统并选择身份验证类型

在此步骤中,您可以启用安全系统,选择身份验证类型和默认权限策略。

SolutionWizard_Step3.1

If you selected eXpress Persistent Objects in the previous step, you can also choose the client-side security mode or set up the middle-tier security.

SolutionWizard_Step3.2

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.

With the Security System enabled, the wizard also adds the code demonstrated in the How to: Store the Application Model Differences in the Database topic. This code configures the Database Model Difference Storage in both WinForms and ASP.NET modules.

Step 4 鈥� Choose Extra Modules

In this last step, you can choose the XAF extra modules to include.

SolutionWizard_Step4

The wizard will register the selected modules and add the entities required by these modules to the data model.

Result

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

您也可以为现有解决方案运行解决方案向导,以创建其他XAF项目。用鼠标右键单击在解决方案资源管理器中,选择添加| 新建项目...,然后选择DevExpress v 19.2 XAF解决方案向导。在这种情况下,下图显示了向导的起始页。

Wizard_Project

下表列出了可用的项目及其描述。

模板名称

描述

也可以看看

WinForm应用程序项目

用于创建桌面应用程序的XAF项目。

ASP.NET应用程序项目

用于创建Web应用程序的XAF项目。

模块项目

用于创建自定义XAF模块的类库项目。

应用服务器项目

一个为XAF应用程序创建中间层服务器的项目。

工作流服务器项目

一个项目,用于为启用了工作流程的XAF应用程序创建工作流程服务器。

转载保留此链接,注明出处