Problem with Silverlight application

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
crazypit
Posts: 163
Joined: Wed 15 Apr 2009 08:43

Problem with Silverlight application

Post by crazypit » Thu 02 Jul 2009 08:11

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?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 02 Jul 2009 13:12

Could you please send us (support * devart * com) a smal test project illustrating the problem?

crazypit
Posts: 163
Joined: Wed 15 Apr 2009 08:43

Post by crazypit » Thu 02 Jul 2009 13:56

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?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 02 Jul 2009 14:06

Did you encounter the problem discussed in the following post?
http://devart.com/forums/viewtopic.php?p=46708#46708

crazypit
Posts: 163
Joined: Wed 15 Apr 2009 08:43

Post by crazypit » Thu 02 Jul 2009 14:14

Yep. That's it.

crazypit
Posts: 163
Joined: Wed 15 Apr 2009 08:43

Post by crazypit » Fri 25 Sep 2009 07:03

Anything new on this?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 25 Sep 2009 13:24

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.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 17 Nov 2009 08:21

The new Beta build is available for download. Is the problem reproducible with it?

Post Reply