Skip to main content
Home Forums Silverlight Programming Accessing Web Services with Silverlight No linqtosql table variables visible, only methods.
4 replies. Latest Post by Startselect on November 3, 2009.
(0)
Startselect
Member
0 points
6 Posts
11-03-2009 4:25 AM |
Hi, I've been using linqtosql with silverlight for some time now and I've never had any problems until today.
I have a database with a few tables, for example ACTIONS and USERS, and thus there are corresponding datatypes in my .web project, ACTION and USER. When writing a service contract that returns such a datatype for example getAction(int id) the datatype ACTION would become visible through my service reference and usable in the silverlight project.
After I've added a few columns to some tables and updated the O/R-model .dbml and then the service reference all such datatypes have stop being usable in the silverlight project. I can still call all the methods I've defined in the service but I can't use the datatypes.
I've tried deleting both the dbml and the service reference and recreate them but the problem persists and I can't find anything on the web. I would very much appreciate any help!
mrjvdveen
Participant
1953 points
369 Posts
11-03-2009 4:59 AM |
Have you looked at what code is generated behind the .dbml? Are the classes public?
Also, have you looked at the generated proxy class to check the return types of the methods (in the *completedargs classes)?
And how about using wsdl.exe to generate a proxy just as a test?
HTH.
11-03-2009 5:09 AM |
The code generated is correct as far as I can see.
The thing is, I have 2 projects in the same solution as the .web project. Wen I add the service to one of them it doesn't contain the datatypes but when I add the service to the other project it does contain the datatypes. I can't understand how the same service can show different content in different projects.
amyo
Contributor
3660 points
495 Posts
11-03-2009 5:19 AM |
So far you have tried almost all the option. That should work.
If your project is under source control please check that deleted service reference removed from your project(from server and the work space).
Then try to add it again.
11-03-2009 6:58 AM |
amyo, that kinda worked. I cleared out everything regarding service references from my svn and then recreated the service reference in the main project (the one that didn't get the datatypes before) it then got a correct service reference with all the datatypes. I then added the service reference to the other project which always has the correct datatypes. The projects compile and run but they get the following error when the other project uses the service reference:
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
When I after this update the two services the main project loses the datatypes and the other project keeps them.
What could be causing this?
They cant use the same service because the other project is unaware of the main project.