MS 企业库可以从数据库构建对象模型和代码吗?
我刚刚在一个需要支持/增强的应用程序中遇到了 MS Enterprise Application Library 3.1。我特别想快速了解 Microsoft.Practices.EnterpriseLibrary.Data。
关于此的文档非常好,但阅读量很大,我对其中的一个方面感到好奇:
几年前,当 .Net 1.0 首次问世时,在一本书中描述了一个工具,名为: “VB.NET 中的.Net 企业开发:从设计到开发”,作者:Matthew Reynolds、Karli Watson 等人。
这个工具被称为 WEO 对象生成器(Wrox Enterprise Objects),我记得它有一个代码生成工具,我可以在其中将这个“对象生成器”程序指向 SQL Server 数据库,它会生成一个对象模型(与表相对应的类)但也有多种变化和选项)。
我目前收到的这个项目使用:
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;
..并且一些文档让我想起了这个旧的 WEO 东西。
企业库有一个 Microsoft.Practices.ObjectBuilder 和 Microsoft.Practices.ObjectBuilder2,但我认为它们所做的事情与旧的 WEO 所做的事情不同。
是否有一种“现代”工具可以从数据库模式构建“业务对象”?我听说过实体框架但根本没有研究过?
I have just encountered the MS Enterprise Application Library 3.1 in an application I need to support/enhance. I am trying to get up to speed quickly on Microsoft.Practices.EnterpriseLibrary.Data in particular.
The doc on this is quite good but the reading is vast and I am curious about one aspect of this:
Years ago when .Net 1.0 first came out, there was a tool described in a book called:
".Net Enterprise Development in VB.NET: From Design to Development" by Matthew Reynolds, Karli Watson, et al.
This tool was called the WEO Object Builder (Wrox Enterprise Objects) and as I recall it had a code generation facility where I could point this "object builder" program at a SQL Server database and it would generate an object model (classes corresponding to tables but with several variations and options available too).
This current project I've been handed uses:
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;
..and some of the doc reminds me of this old WEO thing.
Enterprise Library has an Microsoft.Practices.ObjectBuilder and Microsoft.Practices.ObjectBuilder2 but I don't think these do the same sort of thing as the old WEO thing did.
Is there a "modern-day" tool which builds "business objects" from a database schema? I've heard about the Entity Framework but not investigated at all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实体框架和 NHibernate 是一对对象关系映射器 (ORM)。
Enterprise Library 没有 ORM 功能。
Entity Framework and NHibernate are a couple of Object Relational Mappers (ORMs).
Enterprise Library doesn't have ORM capabilities.