Problem with Silverlight application
Problem with Silverlight application
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?
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?
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?
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?
Did you encounter the problem discussed in the following post?
http://devart.com/forums/viewtopic.php?p=46708#46708
http://devart.com/forums/viewtopic.php?p=46708#46708