新应用程序的数据层:MyGeneration 和/或实体框架
该平台是ASP.Net 3.5sp1,带有Oracle数据库。 为了节省时间和方便,我们在数据层(可能还有业务层中的一些基类)中考虑了 MyGeneration 和实体框架。
我的问题是:
使用 Entity Framework 与 MyGeneration 有何优缺点?
关于使用 MyGeneration 生成将使用实体框架的代码有什么想法吗?
我希望得到在这两个方面都有经验的开发人员的反馈,但欢迎任何反馈。
迄今为止我们所做的研究:我们有一位精通 MyGeneration 的团队成员。 我们观看了几个教程视频并阅读了实体框架的介绍文档。
注意:我们知道,如果实体框架是解决方案的一部分,则需要为 Oracle 购买实体框架数据提供程序。
此外,我们知道实体空间,但由于其他原因它似乎不是候选者。
The platform is ASP.Net 3.5sp1, with an Oracle db. We've considered both MyGeneration and Entity Framework for time and convenience in the DataLayer (and maybe some base classes in the Business Layer).
My questions are:
Any pros and cons of using Entity Framework vs MyGeneration?
Any thoughts on using MyGeneration to generate code that would use Entity Framework?
I'm hoping for feedback from developers with experience in both, but any feedback is welcome.
Research we have done so far: We have a team member who is proficient in MyGeneration. We've watched several tutorial videos and read intro docs of Entity Framework.
Note: We are aware of the need to purchase an Entity Framework data provider for Oracle if Entity Framework is a part of the solution.
Also, we are aware of Entity-Spaces, but it does not appear to be a candidate for other reasons.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我必须说,我对 MyGeneration 没有太多经验,但在过去 6 个月中,我在使用 Entity Framework v1 构建小型应用程序方面拥有丰富的经验。 根据我在映射存储过程方面的经验以及在 v1 中仅从 SP 结果返回模型对象的麻烦,如果您目前想要最可行的选项,我建议此时使用 MyGeneration。 实体框架中仍然有很多痛点正在 v2 中得到解决(祈祷)。
I must say that I don't have much experience with MyGeneration, but I have a lot of experience over the past 6 months building smaller apps with Entity Framework v1. From what I have went through with mapping Stored Procedures and the trouble around returning only Model objects from SP result in v1, I would suggest going with MyGeneration at this time if you are wanting the most viable option at the present time. There are still a lot of pain point in Entity Framework that are being addressed (fingers crossed) in v2.
如果您有 MyGeneration 导出,那么您可能想坚持使用它。 至于EntityFramework。 我已经将它用于一些小型项目,并且认为在处理小型系统(少于 10-15 个表)时它是完美的。
另外,如果您因为没有“真正”适合您的解决方案而对所有这些问题进行辩论,请考虑我的两个替代选项之一:
If you have a MyGeneration export, then you might want to stick with that. As for EntityFramework. I have used it for a few small projects and think it is perfect when working with smallish systems (fewer than 10-15 tables).
Also, if you are debating all of this because nothing 'really' fits your solution, than consider one of my two alternative options:
我们使用了定制的代码生成器,它们从单个 UML 图(由 IBM Relational Architect 制作,并保存在 XML 文件中)生成 C# 代码、SQL 脚本和实体框架 XML 文件。 这样,您就可以完全控制数据层中的所有内容。 当然,只有项目足够大时才合适,其他方法不太适用。
制作这样的生成器并不太难,在后期阶段您可以增强它们以制作附加功能,例如直接从 UML 图生成 Web 服务。
We have used custom made code generators which were generated C# code, SQL scripts and Entity Framework XML file from single UML diagram (made by IBM Relational Architect, and saved in XML file). In that way, you have total control of everything in your data layer. Of course, it is appropriate only if project is large enough and any other method is less applicable.
It is not too difficult to make such generators, and in later stages you can enhance them to make additional functionalities, such as, for examples web services directly from UML diagram.