0
votes

I've inherited a Silverlight and RIA services project and it uses an EF4, database first DAL.

In the past when I used RIA services (the only other time I used it) it was with NHibernate so we had to mark all the entities with the appropriate [Association] and [Include] attributes. This meant that our navigation properties were available in the Silverlight client application.

At the time, I was under the impression that if we'd used Entity Framework instead of NHibernate, the generated EF model classes would be marked up with attributes that were not exactly [Association] and [Include] but were equivalent.

It appears that this isn't the case, my navigation properties for my model aren't available in the Silverlight client. Do I need to use metadata classes and add the [Association] properties manually to all the classes that require them?

Thanks,

Ben

1

1 Answers

0
votes

My Navigation properties were not present in the client side models because there was a metadata class for the entity which I was using but it only contained one property.

The navigation property wasn't specified in the metadata class so wasn't available on the client.

The moral of the story is, you can't do "partial" metadata classes.