Link to home
Start Free TrialLog in
Avatar of VoxSis
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_ContractPageResult> SP_ContractsData()
        {
            return this.Context.SLClient_ContractPage().ToList<SLClient_ContractPageResult>();
        }

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?
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

If you execute the stored procedure, and don't convert it to an IList, do you get the correct results?
ASKER CERTIFIED SOLUTION
Avatar of VoxSis
VoxSis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial