sp和linq中的返回类型 [英] return type in sp and linq

查看:78
本文介绍了sp和linq中的返回类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下,识别哪些商店程序返回的技术是什么?以及如何在linq中调用sp ..我查看了几个链接,当我谷歌这时我认为 根据返回类型,我们在linq中调用sp,所以请任何人都可以解释这个
什么是返回类型以及我们如何在sp中识别以及如何调用linq  sp in linq 

i want to ask that what are the technique to identify what store procedure return .. and how to call sp in linq .. i review several link when i google this so i think   according to return type we call sp in linq so please any one can explain this what is returntype and how we identify in sp and how to call  thais  sp in linq 

推荐答案

你好rebmaamberrebmaamber,

Hi rebmaamberrebmaamber,

>>根据我们在linq中调用sp的返回类型所以请任何人都可以解释这个什么是返回类型以及我们如何在sp中识别以及如何在linq中调用  thais  sp 

>>according to return type we call sp in linq so please any one can explain this what is returntype and how we identify in sp and how to call  thais  sp in linq 

默认情况下,在DataContext类上创建的方法名称将与SPROC相同name,以及该方法的返回类型将是一个自动创建的类型,该类型遵循"[SprocName] Result"。命名模式。例如:上面的SPROC
将返回"CustOrderHistResult"序列。 。对象 我们可以通过在设计器中选择方法来更改方法的名称,然后使用属性网格重命名方法。

By default the method name created on the DataContext class will be the same as the SPROC name, and the return type of the method will be an automatically created type that follows the "[SprocName]Result" naming pattern. For example: the SPROC above would return a sequence of "CustOrderHistResult" objects.  We could optionally change the name of the method by selecting it in the designer and then use the property grid to rename it.

欲了解更多信息,请参阅:

For more information, please refer to:

http://weblogs.asp.net/scottgu/linq-to-sql-part-6-retrieving-data-using-储存程序

祝你好运,

Cole Wu


这篇关于sp和linq中的返回类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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