使用存储过程时,哪个ORM是最好的 [英] Which ORM is the best when using Stored Procedures

查看:111
本文介绍了使用存储过程时,哪个ORM是最好的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有商业对象(DEVELOPERS WRITE)和一些SPROCS(DBA WRITE)

I have Business objects (DEVELOPERS WRITE) and some SPROCS (DBA WRITE)

任何人都可以推荐一个好的对象映射器来处理这种设置。

Can anyone recommend a good object mapper to deal with this kind of setup.

我试过codemith和nhibernate和麻烦。我不介意我的ORM是免费还是付费。

I tried codesmith and nhibernate and had trouble. I do not mind if my ORM is free or paid.

推荐答案

SubSonic对sprocs有极好的支持。它将每一个包装在一个帮助方法,你可以从结果中检索强类型的集合或实体,如果你想要的。我在此博文中展示了一种方法, a>。只要你的sproc返回与SELECT * FROM TableName相同的模式,它将与您的SubSonic实体一起工作。

SubSonic has excellent support for sprocs. It will wrap each one in a helper method and you can retrieve strongly-typed collections or entities from the results if you want. I show a way to do that in this blog post. As long as your sproc returns the same schema as SELECT * FROM TableName would, it will work with your SubSonic entities.

至于基于你的db生成类,SubSonic生成部分类,以便您可以根据需要扩展它们。您还可以从SubSonic生成的类映射到您的实际模型。

As far as generating classes based on your db, SubSonic generates partial classes so you can extend them as needed. You could also do mappings from the SubSonic generated classes to your actual model.

这篇关于使用存储过程时,哪个ORM是最好的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆