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 使用向导创建解决方案的更多相关文章

  1. Win10或Win8下ObjectARX2015 Wizard向导创建项目失败解决方法

    [原创]objectARX 2015 Wizard安装向导在Win8/win10下无法创建项目的解决方法总结by edata @2017-5-1objectARX 2015 Wizard安装向导在Wi ...

  2. NX二次开发-创建NX9 NXOpenCPP Wizard开发向导模板

    这篇文章,我在CSDN,在唐工论坛都发过.http://www.nxopen.cn/forum.php?mod=viewthread&tid=2039&highlight=NX9 博客 ...

  3. INNO SETUP脚本向导创建的基本脚本

    脚本范例分析:先来看看一段用INNO SETUP脚本向导创建的基本脚本的[Setup]段: [Setup]   AppName=Premiere 6.5 汉化补丁-----------------(程 ...

  4. AutoCAD二次开发(2020版)--4,使用ARX向导创建编程模板(框架)--

    手动创建ObjectARX应用程序非常麻烦,在此步骤中,将介绍ObjectARX向导. 在这里,我们将使用ObjectARX向导创建我们的ObjectARX应用程序. 本节的程序的需求是,接收CAD用 ...

  5. create和grant配合使用,对Mysql进行创建用户和对用户授权

    1.首先创建用户username以及密码passwd,授权主机localhost. create user ‘username’@'localhost' identified by 'passwd' ...

  6. [Solution] Microsoft Windows 服务(1) C#创建Windows服务

    Microsoft Windows 服务(即,以前的 NT 服务)使您能够创建在它们自己的 Windows 会话中可长时间运行的可执行应用程序.这些服务可以在计算机启动时自动启动,可以暂停和重新启动而 ...

  7. Netsharp快速入门(之7) 基础档案(工作区1 向导创建工作区)

    作者:秋时 杨昶   时间:2014-02-15  转载须说明出处 3.5     商品开发 3.5.1  创建部件工作区 3.5.1.1 工作区向导 1.打开平台工具,选择界面管理节点下的部件工作区 ...

  8. CRM WEB UI 01 BOL向导创建的搜索

    创建BOL的步骤就不说了,自己找,学习这个之前,需要自己先找个SAP CRM资料预习一下 T-CODE:BSP_WD_CMPWB 1.创建组件:输入组件名:ZLYTEST03,点击创建按钮,回车,选择 ...

  9. 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 ...

随机推荐

  1. Docker 以及 docker-compose 的部署

    Docker部署 方式一 #下载软件源 wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.ustc.edu.cn/docker-ce/li ...

  2. Nginx-HTTP Strict Transport Security(HSTS)

    HTTP Strict Transport Security(HSTS) HTTP Strict Transport Security(通常简称为HSTS)是一个安全功能,它告诉浏览器只能通过HTTP ...

  3. ASP.NET4.0中JavaScript脚本调用Web Service 方法

    环境:VS2019  .net 4.0 framework 根据教材使用ScriptManager在JavaScript中调用Web service 时,失败.现将过程和解决方法记录如下: 1.定义W ...

  4. Java连载62-使用throws关键字处理异常

    ​一.处理异常的两种方式 1.所有的编译时异常,要求程序员在编写程序阶段,必须对它进行处理,如果不处理的话,编译就会无法通过,处理异常有两种方法:捕捉和声明抛出. 2.捕捉:try.....catch ...

  5. 软件开发工具(第11章:Eclipse CDT开发常用功能)

    一.自定义编辑器 C/C++首选项设置(重点.记忆.应用) 单击菜单栏中的窗口(Window)菜单, 选择首选项(Preferences)选项,在 弹出的对话框左侧部分,展开C/C++树 形菜单. 外 ...

  6. day04逻辑运算符短路、多分支结构(if和switch)、循环结构、while循环

    复习 1.运算符和表达式 1)表达式 2)算数运算符 + - * / % 3)关系运算符 >  <  >=  <=  ==  != 4)逻辑运算符 &&   | ...

  7. 如何编写一个工程文件夹下通用的Makefile

    新建工程文件夹,在里面新建 bsp.imx6ul.obj 和project 这 3 个文件夹,完成以后如图所示: 新建的工程根目录文件夹 其中 bsp 用来存放驱动文件:imx6ul 用来存放跟芯片有 ...

  8. Cocos Creator 资源加载流程剖析【四】——额外流程(MD5 PIPE)

    当我们将游戏构建发布到web平台时,勾选Md5 Cache选项可以开启MD5 Pipe,它的作用是给构建后的资源加上md5后缀,避免浏览器的缓存导致部分资源不是最新,因为使用了md5后缀后,当资源内容 ...

  9. Yii2中多表关联查询

    准备条件: 1.首先准备两张表: customer(用户表)(id, name) order(订单表)(id, customer_id, price) customer 表和 order 表之间是一对 ...

  10. CGI environment variables