VoxSis
asked on
Linq2Sql executing stored procedures (Silverlight)
Hi
I'm trying to retrieve whole custom table from a stored procedure ( SLClient_ContractPage() ) in (.Net C# Silverlight), but with no success so far;
Using the ORM designer (drag-drop stored procedure, recreated the dbml file)
Created funciton in the DomainService (web project):
public IList<SLClient_ContractPag eResult> SP_ContractsData()
{
return this.Context.SLClient_Cont ractPage() .ToList<SL Client_Con tractPageR esult>();
}
Then, from DomainContext (on silverlight project), when I execute the above method and gather the results, the number of it is proper (105 records in my case), but only one record is repeated 105 times!
I debugged the situation, and seen that on the server I have retrieved the all data, but on the client only the first record is repeating itself for as many times as there is data in the server...
Can you tell me what could cause this situation?
I'm trying to retrieve whole custom table from a stored procedure ( SLClient_ContractPage() ) in (.Net C# Silverlight), but with no success so far;
Using the ORM designer (drag-drop stored procedure, recreated the dbml file)
Created funciton in the DomainService (web project):
public IList<SLClient_ContractPag
{
return this.Context.SLClient_Cont
}
Then, from DomainContext (on silverlight project), when I execute the above method and gather the results, the number of it is proper (105 records in my case), but only one record is repeated 105 times!
I debugged the situation, and seen that on the server I have retrieved the all data, but on the client only the first record is repeating itself for as many times as there is data in the server...
Can you tell me what could cause this situation?
If you execute the stored procedure, and don't convert it to an IList, do you get the correct results?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.