ASP.NET MVC 2存储过程 [英] store procedures with ASP.NET MVC 2
本文介绍了ASP.NET MVC 2存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好? :):confused:
某些机构可以告诉我在哪里可以找到视频教程,或者如何使用asp.net mvc2在网页上查看存储过程? (结果视图)
它的垃圾箱整周杀死了我.
有人可以帮我吗,我是新手.
谢谢您,
hello?? :) :confused:
can some body tell where i can find a video tutorial or how i can view a store procedure on to a web page using asp.net mvc2? (result view)
its bin killing me all week.
can somebody help me please I''m new at this.
thank you,
推荐答案
这应该对您有帮助
http://forums.asp.net/t/1623660.aspx/1/10?MVC2 + Guid + OUTPUT + parameter + from + Stored + Procedure
This should help
http://forums.asp.net/t/1623660.aspx/1/10?MVC2+Guid+OUTPUT+parameter+from+Stored+Procedure
如果您使用的是像实体框架这样的ORM,则可以调用像这样的控制器中的项目列表.
//这些是将传递到存储过程中的参数
If your using a ORM like Entity Framework you can call the list of items in your Controller like this.
//these are the parameters that will pass into a storedprocedure
public ActionResult SearchList()
{
var model = new Models.SearchBy();
model.para1 = 0;
model.para2 = 0;
model.para3 = DateTime.Today;
model.para4 = DateTime.Today;
return View(model);
}
//然后调用将参数传递到存储过程的列表
//and then call the list passing the parameters into it the stored procedure
public ActionResult List(Models.SearchBy dr)
{
listEntities n = new listEntities();
var model = n.Get_Gamelist(dr.para1, dr.para2,dr.para3,dr.para4);/*but put them in the right place*/
return View(model);
}
我希望这很有帮助.
i hoop this was helpful.
^ ]
这篇关于ASP.NET MVC 2存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文