Question

When using DataLoadOptions.LoadWith with ria services hooked up to a linq to sql model do i always have to specify the [Include] attribute in the entitys metadata class for relationships? I currently dont use metadata for my entities and if theres a way to achieve this without i would be grateful to know.

Was it helpful?

Solution

You do need to have the [Include] attribute on the entity's metadata so that RIA Services knows to serialize the related entities and send them to the client. Without this, RIA Services could end up traversing lazily loaded properties that you don't want it to include.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top