使用mvc模块的存储过程 [英] store procedure using mvc module

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

问题描述

如何在mvc模块中使用存储过程??????

how to use store procedures in mvc module ??????

推荐答案

创建一个单独的类库,称为数据访问层"或不那么通用的类,并创建一个类来处理调用存储的proc,从结果中创建对象的类,等等.关于如何处理该类有很多意见,但也许最常见的是:
Create a separate class library, called "Data Access Layer" or something less generic, and create a class that handles calling your stored procs, creating objects from the results, etc. There are many opinions on how this should be handled, but perhaps the most common is:
View
|
Controller
|
Business Logic
|
Data Access Layer
   |--- SQL (Stored procs)
           -Tables
           -Views
           -etc.


MSDN上有关于该主题的不错的教程. [如何在MVC中调用存储过程 [ ^ ]
如何从MVC调用存储过程 [ ^ ]


MSDN has a decent tutorial on the topic.[^]
Ref: stackoverflow

Please refer:
How to call stored procedure in MVC[^]
How to call a stored procedure from MVC [^]


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

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