none
return type in sp and linq RRS feed

  • Question

  • 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 
    Tuesday, July 26, 2016 6:16 AM

All replies

  • Hi rebmaamberrebmaamber,

    >>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 

    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-stored-procedures

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 27, 2016 1:59 AM
    Moderator