Create a Solution using the Wizard 使用向导创建解决方案
In this lesson, you will learn how to create a new XAF solution. You will also be able to run the generated WinForms and ASP.NET Web applications, and see the default application state.
在本节课中,您将学习如何创建一个新的XAF解决方案。您还可以运行生成的WinForms和ASP.NET Web应用程序,并查看默认的应用程序状态。
- In the main menu of Visual Studio, select File | New | Project... to invoke the New Project dialog.
In the Installed | Templates tree, expand the desired language (Visual C# or Other Languages | Visual Basic), and then choose DevExpress XAF. In the panel to the right, select DevExpress v19.2 XAF Solution Wizard, specify the new solution's name ("MySolution") and click OK.
- 在Visual Studio的主菜单中,选择文件| New | Project…以调用新项目对话框。
- 在已安装的|模板树中,展开所需的语言(Visual c#或其他语言| Visual Basic),然后选择DevExpress XAF。在右侧的面板中,选择DevExpress v19.2 XAF解决方案向导,指定新解决方案的名称(“MySolution”),然后单击OK。

This will invoke the Solution Wizard. In the first screen of the wizard, choose the target platform(s). You can create separate WinForms, ASP.NET, Mobile (maintenance mode) applications, or multiple applications at once. Choose the WinForms and ASP.NET platforms and click Next.
这将调用解决方案向导。在向导的第一个屏幕中,选择目标平台。您可以创建单独的WinForms, ASP。NET、移动(维护模式)应用程序或多个应用程序同时使用。选择WinForms和ASP.NET平台,然后单击Next。

In the next screen, choose Entity Framework Code Fist or eXpress Persistent Objects, and click Next.
在下一个屏幕中,选择Entity Framework Code first或eXpress Persistent Objects,然后单击next。

Note
You can use the Entity Framework (EF)
or eXpress Persistent Objects (XPO) as your project's object-relational mapping (ORM)
请注意
您可以使用实体框架(EF)
或者将持久对象(XPO)表示为项目的对象-关系映射(ORM)
tool. In this tutorial, only the EF Code First and XPO approaches are considered. Note that EF is not supported by two extra modules: Audit Trail and Clone Object. If you are going to use these modules, choose XPO. Otherwise, either ORM can be used.
In the next screen, you can choose the security options of your application. Choose Active Directory as the Authentication type, Allow/Deny as Default Permission Policy (and select Client-Side Security - Integrated Mode as the Database security type if you chose the XPO ORM in the previous step) and click Next.
工具。在本教程中,只考虑EF代码优先和XPO方法。请注意,EF不支持两个额外的模块:审计跟踪和克隆对象。如果要使用这些模块,请选择XPO。否则,可以使用任一ORM。
在下一个屏幕中,您可以选择应用程序的安全选项。选择Active Directory作为身份验证类型,将Allow/Deny作为默认的权限策略(如果在上一步中选择了XPO ORM,则选择客户端Security - Integrated Mode作为数据库安全类型),然后单击Next。

On the next screen, you can choose the required XAF modules, which will automatically be added to your application. Select the Business Class Library Customization module and click Finish.
在下一个屏幕上,您可以选择所需的XAF模块,这些模块将自动添加到您的应用程序中。选择Business Class库自定义模块并单击Finish。

Note
Most of the other modules will be added manually in the Extra Modules section.
Once the solution has been created, you will see five projects in the Solution Explorer.
请注意
其他大部分模块将手动添加到“额外模块”部分。
创建解决方案之后,您将在解决方案资源管理器中看到五个项目。
- MySolution.Module - the basic module project that contains code common to WinForms and ASP.NET Web applications.
- MySolution.Module.Web - the module project that contains code specific to the ASP.NET Web application.
- MySolution.Module.Win - the module project that contains code specific to the WinForms application.
- MySolution.Web - the ASP.NET application project is similar to the WinForms application, but generates a browser-based interface instead of a WinForms interface. Do not use this project for feature implementation. All application logic should be implemented in the appropriate Module projects.
- MySolution.Win - the WinForms application project, which relies on basic and WinForms modules, automatically generates the Windows user interface. Do not use this project for feature implementation. All application logic should be implemented in the appropriate Module projects.
- MySolution。模块-包含WinForms和ASP通用代码的基本模块项目。净的Web应用程序。
- MySolution.Module.Web -包含特定于ASP的代码的模块项目。净的Web应用程序。
- MySolution.Module.Win -包含特定于WinForms应用程序的代码的模块项目。
- MySolution.Web - ASP.NET应用程序项目与WinForms应用程序类似,但生成的是基于浏览器的接口,而不是WinForms接口。不要将此项目用于功能实现。所有应用程序逻辑都应该在适当的模块项目中实现。
- MySolution。WinForms应用程序项目,它依赖于基本和WinForms模块,自动生成Windows用户界面。不要将此项目用于功能实现。所有应用程序逻辑都应该在适当的模块项目中实现。
Tutorial_BMD_Lesson1_2

You can refer to the Application Solution Structure topic for additional information on the XAF solution structure.
有关XAF解决方案结构的更多信息,可以参考应用程序解决方案结构主题。
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 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.
请注意
向导尝试检测安装的SQL server并相应地更改连接字符串。受支持的服务器是Microsoft SQL Server(包括Express和LocalDB版本)。要使用另一个数据库系统(PostgreSQL、MySQL、Oracle、SQLite、Firebird等),请更改App.config和Web中的ConnectionString参数。配置文件的WinForms/ASP。网络应用程序项目。有关连接不同数据库系统的详细信息,请参阅将XAF应用程序连接到数据库提供者主题。
You can now run the WinForms and ASP.NET applications. By default, the WinForms project is set as the startup project. To run the ASP.NET Web application, right-click the MySolution.Web project in the Solution Explorer, and select the Set as StartUp Project item from the context menu. Then, click Start Debugging or press the F5 key.
现在可以运行WinForms和ASP。网络应用程序。默认情况下,WinForms项目被设置为启动项目。来运行ASP。NET Web应用程序,右键单击MySolution。在“解决方案资源管理器”中,并从上下文菜单中选择“设置为启动项目”项。然后,单击Start Debugging或按F5键。
The following images show the resulting WinForms and ASP.NET applications. They will already contain the security options for your Active Directory account.
WinForms
下面的图像显示了生成的WinForms和ASP。网络应用程序。它们将已经包含您的Active Directory帐户的安全选项。
WinForms

ASP.NET

By default, the wizard enables the Tabbed MDI UI type and the Ribbon Form Style in the WinForms application. Refer to the Choose the WinForms UI Type and Toggle the WinForms Ribbon Interface topics to learn how to change these options.
默认情况下,向导在WinForms应用程序中启用选项卡MDI UI类型和Ribbon表单样式。请参考“选择WinForms UI类型”和“切换WinForms Ribbon界面主题”,以了解如何更改这些选项。
Create a Solution using the Wizard 使用向导创建解决方案的更多相关文章
- Win10或Win8下ObjectARX2015 Wizard向导创建项目失败解决方法
[原创]objectARX 2015 Wizard安装向导在Win8/win10下无法创建项目的解决方法总结by edata @2017-5-1objectARX 2015 Wizard安装向导在Wi ...
- NX二次开发-创建NX9 NXOpenCPP Wizard开发向导模板
这篇文章,我在CSDN,在唐工论坛都发过.http://www.nxopen.cn/forum.php?mod=viewthread&tid=2039&highlight=NX9 博客 ...
- INNO SETUP脚本向导创建的基本脚本
脚本范例分析:先来看看一段用INNO SETUP脚本向导创建的基本脚本的[Setup]段: [Setup] AppName=Premiere 6.5 汉化补丁-----------------(程 ...
- AutoCAD二次开发(2020版)--4,使用ARX向导创建编程模板(框架)--
手动创建ObjectARX应用程序非常麻烦,在此步骤中,将介绍ObjectARX向导. 在这里,我们将使用ObjectARX向导创建我们的ObjectARX应用程序. 本节的程序的需求是,接收CAD用 ...
- create和grant配合使用,对Mysql进行创建用户和对用户授权
1.首先创建用户username以及密码passwd,授权主机localhost. create user ‘username’@'localhost' identified by 'passwd' ...
- [Solution] Microsoft Windows 服务(1) C#创建Windows服务
Microsoft Windows 服务(即,以前的 NT 服务)使您能够创建在它们自己的 Windows 会话中可长时间运行的可执行应用程序.这些服务可以在计算机启动时自动启动,可以暂停和重新启动而 ...
- Netsharp快速入门(之7) 基础档案(工作区1 向导创建工作区)
作者:秋时 杨昶 时间:2014-02-15 转载须说明出处 3.5 商品开发 3.5.1 创建部件工作区 3.5.1.1 工作区向导 1.打开平台工具,选择界面管理节点下的部件工作区 ...
- CRM WEB UI 01 BOL向导创建的搜索
创建BOL的步骤就不说了,自己找,学习这个之前,需要自己先找个SAP CRM资料预习一下 T-CODE:BSP_WD_CMPWB 1.创建组件:输入组件名:ZLYTEST03,点击创建按钮,回车,选择 ...
- Cannot create container for service peer1.org2.example.com: Conflict. 解决方案
I have a docker-compose.yaml file defining 5 services: orderer.example.com peer0.org1.example.com pe ...
随机推荐
- asp.net core 3.0 MVC JSON 全局配置
asp.net core 3.0 MVC JSON 全局配置 System.Text.Json(default) startup配置代码如下: using System.Text.Encodings. ...
- C#界面设计相关设置
1.Anchor属性设置 对需要设置的控件,如主窗体中的TextBox,设置Anchor为上下左右都停靠,就会实现随着窗体的变化而变化. 2.AutoScaleMode属性的用法:<转自:htt ...
- 爬虫(五):代理IP、Cookie
1. 代理IP 代理IP这个功能呢,在urllib和requests中都存在,但是这个在大的爬虫项目中是非常重要的,所以我拿出来单独讲解. 对于某些网站,如果同一个 IP 短时间内发送大量请求,则可能 ...
- com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
1.错误显示 com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details log提示:Generate Si ...
- PHP 正则匹配h1的数据报错 preg_match(): Unknown modifier 'h' in
问题: $str = "<h1>this is test msg</h1>"; $ruler = "/^<h1>(.*?)</h ...
- centos7配置Memcached
Memcached是一套分布式的高速缓存系统,用于提升网站访问速度,尤其对于一些大型的.需要频繁访问数据库的网站,访问速度提升效果十分显著. 1.安装memcached yum install mem ...
- JavaScript图形实例:四瓣花型图案
设有坐标计算公式如下: X=L*(1+SIN(4α))*COS(α) Y=L*(1+SIN(4α))*SIN(α) 用循环依次取α值为0~2π,计算出X和Y,在canvas画布中对坐标位置(X,Y)描 ...
- mysql如何处理高并发(转)
mysql高并发的解决方法有:优化SQL语句,优化数据库字段,加缓存,分区表,读写分离以及垂直拆分,解耦模块,水平切分等. 高并发大多的瓶颈在后台,在存储mysql的正常的优化方案如下: (1)代码中 ...
- laravel .env文件的使用
umen 是 laravel 的衍生品,核心功能的使用和 laravel 都是一致的,但配置文件这一方面,lumen 在 laravel 的基础上增加了更简便的配置方式:lumen 采用了 DotEn ...
- 使用StampedLock
/** * StampedLock和ReadWriteLock相比,改进之处在于:读的过程中也允许获取写锁后写入!这样一来,我们读的数据就可能不一致,所以,需要一点额外的代码来判断读的过程中是否有写入 ...