如何在MVC中调用第一个approch的存储过程? [英] How to call store procedure for code first approch in MVC?
本文介绍了如何在MVC中调用第一个approch的存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用代码第一种方法....我在sql server中创建了一些存储过程...但我不知道如何将存储过程调用到MVC ???
帮助我..
提前感谢
我是什么尝试过:
i不要如何使用存储过程来mvc
I am using code first approach....I am creating number of store procedure in sql server...but i dont no how to call store procedure to MVC???
Help me..
thanks in advance
What I have tried:
i dont no how to use store procedure to mvc
推荐答案
MVC是一个表示框架,你不能用它来调用存储过程。要调用SP,您需要一个数据库框架,因为您首先提到代码,您可能正在使用实体框架。如果你谷歌你会发现很多例子
实体框架代码第一个存储过程 - Google搜索 [ ^ ]
MVC is a presentation framework, you can't use it to call stored procedures. To call SPs you'll need a database framework, as you mention code first you're probably using entity framework. If you google you'll find lots of examples
entity framework code first stored procedure - Google Search[^]
这篇关于如何在MVC中调用第一个approch的存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文