Business Model Design 业务模型设计
Note
This section is split into two parts, which describe the use of two different Object-relational mapping (ORM)
请注意
本节分为两个部分,它们描述了两个不同对象关系映射(ORM)的使用
tools: Entity Framework (EF) and eXpress Persistent Objects (XPO)
工具:EF和XPO
. You will start by choosing the one ORM you will use in your project and the subsequent steps will reflect your choice.
In this section, you will learn how to design a business model (database) when building business applications via the eXpressApp Framework. You will create business classes that will be mapped to database tables. You will also learn how to set relationships between classes, implement dependent properties, validate property values, and so on.
您将首先选择一个您将在项目中使用的ORM,随后的步骤将反映您的选择。
在本节中,您将了解如何在通过eXpressApp框架构建业务应用程序时设计业务模型(数据库)。您将创建映射到数据库表的业务类。您还将学习如何设置类之间的关系、实现从属属性、验证属性值等。
To design a business model, the following techniques will be used.
Use the Business Class Library
The Business Class Library provides the most commonly used business classes, such as Person, Event, Task, etc. You can use a class from this library as is, or inherit from it to extend it.
From Scratch
If you use XPO and the Business Class Library does not provide the appropriate business class, inherit from one of the Base Persistent Classes. When using EF, you can create business classes from scratch without inheritance, as demonstrated in the Code First to a New Database tutorial.
要设计业务模型,将使用以下技术。
- 使用业务类库
业务类库提供最常用的业务类,如Person、事件、任务等。您可以直接使用这个库中的类,也可以继承它来扩展它。
- 从头开始
如果您使用XPO,而业务类库没有提供适当的业务类,则从基本的持久类之一继承。在使用EF时,您可以从头开始创建业务类,而不需要继承,如代码中所示,首先创建一个新的数据库教程。
Tip
If you need to build an application based on an existing database, refer to the How to: Generate XPO Business Classes for Existing Data Tables or Use Entity Framework with an Existing Database topic.
After completing the tutorial, you will have WinForms and ASP.NET applications.
提示
如果需要基于现有数据库构建应用程序,请参阅如何:为现有数据表生成XPO业务类,或使用现有数据库主题的实体框架。
完成本教程后,您将拥有WinForms和ASP。网络应用程序。
The ASP.NET application will provide almost the same functionality, but via a slightly different set of visual elements.
ASP。NET应用程序将提供几乎相同的功能,但通过一组稍微不同的可视化元素。
Proceed to Create a Solution using the Wizard to start the tutorial.
继续使用向导创建一个解决方案来开始本教程。
最新文章
- mybatis 中的where标签
- 月薪3万的程序员告诉你:这样工作才能拿高薪(转 IT之家)
- Java基础(二) ---- 继承(Inheritance)
- css3 半个字符美化方法
- ASP.NET MVC URL重写与优化(1)-使用Global路由表定制URL
- C#和VC++字符集和编码
- Android - 应用名称设置的问题
- MEF技术
- Python自动化运维之24、JQuery
- 模块SEO优化中{分类名称}分隔符去掉及只调用下级分类方法
- Excel 开发概述
- JQuery的 jQuery.fn.extend() 和jQuery.extend();
- App的前后台数据同步
- 1026: [SCOI2009]windy数
- 在CentOS下安装crontab服务
- 移动端和PC端弹出遮罩层后,页面禁止滚动的解决方法及探究
- [论文阅读]MobileNetV2: Inverted Residuals and Linear Bottlenecks
- 安装sqlprompt
- js 库
- 【逆向工具】IDA使用6-签名文件制作