Sunday, January 13, 2013

Entity Framework database first and RIA services navigation properties

Entity Framework database first and RIA services navigation properties

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

Answers & Comments...




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog