views:

9

answers:

1

We have a Silverlight 4 client connecting to RIA services. It's based on the standard "Business Application" Silverlight application in VS 2010. The objects we send to the client over RIA services are EF 4 entities that are POCO objects generated from our edmx by T4. Our RIA service is a LinqToEntitiesDomainService<> of our linq repository.

We have two Entities that share similar structure but are unrelated. Both are both have navigation property that represents a single instances of another entity. Both are retrieved using methods marked [Query]. For one entity the navigation property is always correctly populated when we try and access its value; for the other it is never populated, it always remains null (well it seems to hold an EntityRef<> object that points to a null entity). We have verified the relations in the edmx and the generated code on the client side, both seem to share the same structure, so we don’t understand why this difference in behavior is happening. Can anyone shed some light on the subject?

Many thanks,

Robert

A: 

Cannot give any definate answer, but you could try by checking these things:

  • Is there any data in the database for the object that is null
  • Are the query parameters correct
  • Do you have a test on the server side to see that the data is available
  • Is there an attribute missing on one of the objects
Shiraz Bhaiji