Page 1 of 1

Problem with Silverlight application

Posted: Thu 02 Jul 2009 08:11
by crazypit
Hello,
I have a one-to-many relationship defined between 2 Entities in the Entity Developer. A CaseType on the "one" side and a "Case" entity on the "many" side.
I use them, along with other entities, in a Silverlight application which communicates with the database through the use of a WCF Web Service generated by Visual Studio. I have a Web Service function in which i load Cases and return them to the Silverlight application. As you may already know, the Web Service creates its own set of classes as wrappers for the classes you reference in the function. Therefore, for each Entity class, a new class is created in the context of the Web Service automatically for the client application to use.
The problem is this: If i don't define the aforementioned Association everything works fine. If i define it, the function call fails and i get a :

{System.ServiceModel.CommunicationException: 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.

On a first look, the extra association properties are defined in both set of classes and marked with a DataMemberAttribute.

Can you please advice on the matter?

Posted: Thu 02 Jul 2009 13:12
by AndreyR
Could you please send us (support * devart * com) a smal test project illustrating the problem?

Posted: Thu 02 Jul 2009 13:56
by crazypit
I found out the problem.

Currently, LINQ to SQL does not support object graph serialization out of the box. Therefore, when the serialization engine meets the circular reference between Case.CaseType & CaseType.Cases properties, it breaks.

Nevertheless, i do not need the creation of the EntitySet property but only the EntityRef property. But Entity Developer version 2.0.21 generates broken DataContext code when i choose not to generate the EntitySet property!! I need to remove some entries by hand and this is not very efficient because i need to do the same thing every time i re-generate!!

Is there a roadmap on the fix on this?

Posted: Thu 02 Jul 2009 14:06
by AndreyR
Did you encounter the problem discussed in the following post?
http://devart.com/forums/viewtopic.php?p=46708#46708

Posted: Thu 02 Jul 2009 14:14
by crazypit
Yep. That's it.

Posted: Fri 25 Sep 2009 07:03
by crazypit
Anything new on this?

Posted: Fri 25 Sep 2009 13:24
by AndreyR
The new version of dotConnects will contain a new template engine implementing this and numerous other fixes.
I will post here as soon as it is available.

Posted: Tue 17 Nov 2009 08:21
by AndreyR
The new Beta build is available for download. Is the problem reproducible with it?