.NET 的 SOLID DDD ORM 请求(使用干净的实体和存储库)
是否有一个 ORM 可以
- 让我的实体类保持干净,没有属性的任何属性,并且类
- 不会是 ActiveRecord 模式,因此它不应该有实体。保存/删除等
可选:能够执行存储过程并将结果解析为实体
Is there a ORM that would
- leave my entities classes clean, withouth any attributes for properties and classes
- would not be ActiveRecord pattern so it should not have entity.Save/Delete etc.
optional: able to execute stored procedures and parse the result into entityies
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来 NHibernate 正是您所需要的。这使用映射文件(XML 格式)将类的属性映射到数据库。实体通过 SessionManager 接口进行管理。
文档位于此处。
映射文件还可以从存储过程映射到持久对象。详细信息此处。
Sounds like NHibernate is what you need. This uses a mapping file (in XML) to map the properties of classes to the database. Entities are managed through a SessionManager interface.
Documentation is here.
A mapping file can also map from a stored procedure to your persistent objects. Details here.
您正在寻找的内容通常被称为持久性无知。似乎首选框架是 NHibernate,所以我支持 Jeremy McGee 的回答。
为了完整起见,我想指出 Microsoft 的实体框架将在下一个版本 (.NET 4) 中获得 Persistence Ignorance - 他们称之为 POCO 支持。它是否真的会产生任何好处还有待观察......
What you are looking for is commonly referred to as Persistence Ignorance. It seems that the preferred framework for that is NHibernate, so I second Jeremy McGee's answer.
For completeness' sake I'd like to point out Microsoft's Entity Framework will get Persistence Ignorance in the next version (.NET 4) - they call it POCO support. Whether it will actually turn out to be any good remains to be seen...