实体框架与MVC4.0中的存储过程 [英] Entity frame vs Stored procedure in MVC4.0

查看:89
本文介绍了实体框架与MVC4.0中的存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用实体框架工作和存储过程执行CRUD操作。在这里我有一个疑问..在实体模型或存储过程中进行CRUD操作的最佳方法是什么?

i performed CRUD operations using both Entity Frame work and Stored procedures . here i have one doubt.. what is the best way to doing CRUD operations either Entity Model or Stored procedures?

推荐答案

这完全取决于你需要完成什么。对于简单的CRUD操作,我建议让EF为你处理。

如果你必须根据CRUD操作对数据库进行一堆处理,那么我会使用存储过程来保持数据库中的所有功能。
That all depends on what you need to accomplish. For simple CRUD operations, I would suggest letting EF take care of that for you.
If you have to do a bunch of processing on the database based on CRUD operations, then I would use Stored procedures to keep all that functionality on the database.


这篇关于实体框架与MVC4.0中的存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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