I'm trying to use mvc3. The online documentation says how to connect one class to one table. anybody have a suggestion on how to run stored procedures and return the results to a view?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
MVC is not responsible for the way you access your data. There are many technologies that you can use including
- Plain old ADO.NET
- LINQ to SQL
- NHibernate
- Entity Framework
回答2:
LINQ to SQL is probably the easiest way to get it working without any prior knowledge. Check out Scott Gu's post http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx