pprasadravi (2) [Avatar] Offline
#1
Hi ,
I am using Linq To SQL with stored procedures. When i check the return type is the stored procedure name.
Ex:
My Table name is Customer and stored procedure name is SP_CIS_GetCustomers. The return type is SP_CIS_GetCustomers. Is there anyway ican get the return type is List<Customer>? Could you please help me on this?

Thanks
Ravi Potturi
jwooley (123) [Avatar] Offline
#2
Re: Linq To SQL Stored Procedure Return Type
You can set the return type by either dragging the stored proc onto the desired result type, or changing the "Return Type" in the designer. You can also manually create the stored procedure method as shown in chapter 8. Realze that there must be a direct mapping for all fields if you want the designer to allow the projection. With stored procedures, you can't change any of the field mappings (from Customer_Id to CustomerId for example) as you can with table mappings.

Jim