ORM还是SQL查询? [英] ORM or SQL queries?

查看:161
本文介绍了ORM还是SQL查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的旧应用程序很大,用Delphi和SQL Server 2005编写,现在我想重写(webapp)

为什么我应该使用ORM而不是创建SQL查询(复杂或嵌套)? />
当我在网络应用程序中使用ORM时?

和一般问题mvc或webforms?



谢谢

My old app is big and written in Delphi and SQL Server 2005 now I want to rewrite (webapp)
Why should I use ORM instead of creating SQL queries (complex or nested)?
When I use ORM in web application ?
And a general question "mvc or webforms"?

Thanks

推荐答案

MVC,当然。太奇妙了。比网络表单好多了。至于其余部分,我会使用Entity Framework,因为它非常标准,而且效果很好。我想另一个问题是,你有大量的存储过程写吗?如果是这样,为那些procs编写数据层可能会更快,尤其是如果你正在学习MVC,那么数据层基本上可以自己编写它是好的。
MVC, for sure. It's amazing. So much better than web forms. As for the rest, I would use Entity Framework, just because it's pretty standard, and it works well. I guess the alternative question is, do you have a ton of stored procs written ? If so, writing a data layer for those procs might be quicker, esp if you are learning MVC, it might be good for the data layer to basically write itself.


这篇关于ORM还是SQL查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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