首页 > 其他分享 >学习011-01 Why We Recommend EF Core over XPO for New Development(为什么我们推荐在新开发中使用 EF Core 而不是 XPO)

学习011-01 Why We Recommend EF Core over XPO for New Development(为什么我们推荐在新开发中使用 EF Core 而不是 XPO)

时间:2024-09-22 16:50:16浏览次数:3  
标签:Core XPO EF ORM new XAF

Why We Recommend EF Core over XPO for New Development(为什么我们推荐在新开发中使用 EF Core 而不是 XPO)

XAF supports two Object-Relational Mapping tools: Entity Framework Core and DevExpress XPO. As you might expect, we often receive comparison requests from XAF UI and Web API Service users: which ORM should I choose? The answer, of course, depends on your tasks, and on how familiar you are with XPO and EF Core. Review the information in this topic to choose the ORM that suits your business needs best in the following scenarios:
XAF支持两种对象关系映射工具:Entity Framework Core和DevExpress XPO。正如您所料,我们经常收到来自XAF UI和Web API Service用户的比较请求:我应该选择哪种ORM?答案当然取决于您的任务,以及您对XPO和EF Core的熟悉程度。查看本主题中的信息,以在以下场景中选择最适合您业务需求的ORM:

  • You are new to our application frameworks, have no knowledge of either ORM, and do not yet know which one to choose.
    您是我们应用程序框架的新手,对任一ORM都不了解,并且还不知道该选择哪一个。
  • You are starting a new project, have experience with XPO or EF Core, and want to re-evaluate your choice due to ORM issues or new opportunities.
    您正在开始一个新项目,有使用XPO或EF Core的经验,并且由于ORM问题或新机会而希望重新评估您的选择。

EF Core is the default choice in the Solution Wizard and Getting Started tutorials in v23.1 and later. This change was made because we consider EF Core to be the best choice for new XAF and Web API Service development.
EF Core是v23.1及更高版本的解决方案向导和入门教程中的默认选择。之所以进行此更改,是因为我们认为EF Core是新XAF和Web API Service开发的最佳选择。

Should Existing XPO Users Migrate to EF Core?(现有XPO用户应该迁移到EF Core吗?)

If you have experience with both ORMs and prefer XPO to EF Core, you can continue to use XPO even for new projects - there is no need to switch to EF Core.
如果您有两种ORM的经验并且更喜欢XPO而不是EF Core,那么即使对于新项目,您也可以继续使用XPO-无需切换到EF Core。

Reasons not to switch to EF Core include:
不切换到EF Core的原因包括:

  • We are proud of XPO and all that it offers; it is a mature ORM that we still use in several of our internal projects along with EF Core. New and existing DevExpress customers also continue to use XPO.
    我们为XPO及其提供的一切感到自豪;它是一个成熟的ORM,我们仍然在几个内部项目中与EF Core一起使用。新的和现有的DevExpress客户也继续使用XPO。
  • We continue to develop new XAF and Web API Service features that meet user needs and market demand for XPO and EF Core (there is no “EF Core-First” policy for new XAF development). For instance, XPO supports .NET Core 3, 5, 6, 7, 8, and is expected to support .NET vNext in the future. The new XAF Web API Service and Multi-Tenancy module also support XPO.
    我们继续开发新的XAF和Web API Service功能,以满足用户需求和市场对XPO和EF Core的需求(新XAF开发没有“EF Core-First”政策)。例如,XPO支持。NET Core 3、5、6、7、8,并有望在未来支持。NET vNext。新的XAF Web API Service和Multi-Tenancy模块也支持XPO。
  • We will continue to fix security and other XPO bugs (see Version History), enhance XPO code, and update learning materials for XPO users.
    我们将继续修复安全性和其他XPO错误(请参阅版本历史)、增强XPO代码并更新XPO用户的学习材料。

When choosing an ORM, we advise that you evaluate the current ORM state as it relates to the issues and requirements of your projects.
在选择ORM时,我们建议您评估当前的ORM状态,因为它与您的项目的问题和要求相关。

Compatibility Considerations on a Potential Migration from XPO to EF Core(关于从XPO到EF Core的潜在迁移的兼容性考虑)

To reiterate, DevExpress is not requiring nor asking our customers to migrate from XPO to EF Core. Migration considerations for new projects should be based on your strategic investment in .NET, its potential market changes and the growing popularity of EF Core (see below).
重申一下,DevExpress不要求也不要求我们的客户从XPO迁移到EF Core。新项目的迁移考虑应该基于您对. NET的战略投资、其潜在的市场变化和EF Core的日益普及(见下文)。

Note that XPO and EF Core are entirely different ORMs. These tools handle many things differently; for instance, inheritance and database schemas for the same logically equal entities will be different for these ORMs with default settings. Business classes for these ORMs cannot be used with the same database tables. We did not plan to make these classes compatible (key type, table names, etc.). Applications cannot easily be moved from XAF to another ORM because of different table structures in their data models. Technically, it is possible to migrate your XAF code from one ORM to another (and we have had a few such customers), but you will also need to manually modify your table structure and migrate data (this requires a deep understanding of ORM internals and we do not consult on such matters).
请注意,XPO和EF Core是完全不同的ORM。这些工具处理许多事情的方式不同;例如,对于这些具有默认设置的ORM,相同逻辑上相等的实体的继承和数据库模式将是不同的。这些ORM的业务类不能与相同的数据库表一起使用。我们没有计划使这些类兼容(键类型、表名等)。由于其数据模型中的表结构不同,应用程序无法轻松地从XAF移动到另一个ORM。从技术上讲,可以将您的XAF代码从一个ORM迁移到另一个ORM(我们已经有一些这样的客户),但您还需要手动修改表结构并迁移数据(这需要对ORM内部进行深入了解,我们不会就此类事项进行咨询)。

XPO vs EF Core: Similarities(XPO与EF Core:相似之处)
在这里插入图片描述

XPO vs EF Core: Differences(XPO与EF Core:差异)
在这里插入图片描述

Footnotes(脚注)
1.EF Core supports Middle Tier Security in v23.1 and later.
EF Core在v23.1及更高版本中支持中间层安全性。

2.All statistics are as of March 2023.
所有统计数据截至2023年3月。

标签:Core,XPO,EF,ORM,new,XAF
From: https://blog.csdn.net/thomastang200912_126/article/details/142438960

相关文章

  • 揭开 Vue 3 中大量使用 ref 的隐藏危机
    在Vue3中,ref 是用来创建响应式的引用,它能够追踪和管理单一的变量或对象。当代码中大量使用ref 时,虽然可以实现对各个状态或数据的精细控制,但也会带来一些问题和潜在影响。1. 大量使用ref 带来的问题1、代码冗长与维护成本高当一个组件中大量使用ref,每个状态都需要......
  • 帝国CMS提示“Notice: Use of undefined constant”错误说明: php.ini配置问题
    当你在PHP应用中遇到“Notice:Useofundefinedconstant”的错误提示时,这通常是因为代码中引用了一个未定义的常量。这种错误通常不会导致程序崩溃,但会影响代码的可读性和稳定性。错误原因未定义的常量代码中引用了一个未定义的常量。错误报告级别当前的错误报告......
  • 帝国CMS提示“Notice: Use of undefined constant”错误说明
    当你在使用帝国CMS或其他PHP应用时遇到“Notice:Useofundefinedconstant”这类警告时,通常是因为PHP开启了详细的错误报告。这种警告虽然不影响程序的运行,但会影响用户体验和调试体验。以下是如何解决这个问题的具体步骤:问题分析“Notice:Useofundefinedconstant”这类警......
  • Codeforces Round 974 (Div. 3)
    A:按题意模拟。B:\(i^i\)与\(i\)奇偶性相同,求\((n-k,n]\)的奇数个数。C:二分答案。D:即求每个\((i-d,i]\)有多少线段覆盖。扫到\(i\)时加入所有\(i=l\)的,弹出所有\(r\lei-d\)的。E:枚举相遇点,答案就是\(\min\big(\max(d_1,d_2)\big)\),最短路时记录状态......
  • Codeforces Round 973 (Div. 2)
    CodeforcesRound973(Div.2)A-Zhan'sBlender由于总量固定因此只用计算两个处理时间最大值即是所求#include<bits/stdc++.h>usingnamespacestd;intn;doublex,y;voidsolve(){ cin>>n; cin>>x>>y; inttim1=ceil(n*1.0/x); inttim2......
  • Codeforces Round 974 (Div. 3)
    A.RobinHelps题意:Robin一开始的钱为0,每个人都有ai个金币,如果ai>=k则Robin会拿着它的金币, 如果ai==0且手上有金币,Robin会送出1金币,输出Robin送了几次思路:按照题意Code:#include<bits/stdc++.h>usingnamespacestd;usingLL=longlong;usingi6......
  • 学习如何:useEFFECT 和 useSTATE,一个 REACT 应用程序
    我一直在开发一个名为“Heat”的网络应用程序,该应用程序的唯一目的是帮助我学习和应用JavaScript并改进我的CSS,还有很多后端。我们的计划是创建一个具有视觉吸引力的网络应用程序,并具有一些有趣的功能。在这个过程中我学到了什么:前端是使用reactjs构建的,我选择react只是出于好......
  • 在 Effect-TS 中组合选项:实用指南
    effect-ts提供了几种在函数式编程上下文中组合可选值或选项的强大方法。无论您想要将多个选项配对在一起还是将选项内的函数应用于其他值,该库都提供了多种方法来简化这些操作。在本文中,我们将探讨组合选项的四个关键函数:o.product、o.productmany、o.all和o.ap。示例1:使......
  • 2024华为杯|重磅更新优化|研究生数学建模ABCDEF思路、代码、论文助攻|持续优化更新中.
    赠与读者华为杯比赛25号才结束,不要太着急喔,会慢慢持续更新滴。......
  • 2024华为杯|重磅更新优化|研究生数学建模ABCDEF思路、代码、论文助攻|持续优化更新中.
    赠与读者华为杯比赛25号才结束,不要太着急喔,会慢慢持续更新滴。......