This question is locked. New answers and comments are not allowed.
Apologies if this has been answered before or seems trivial, but I can't seem to get it to work. I tried reading the docs and search also with nothing yet, but some confusing tidbits about FetchPlans and IsManaged and the like. I haven't seen a single step-by-step for what seems like a common task.
Basically in EF 4 using WCF RIA for a Silverlight app, it defines 1:many relationships as an EntityCollection in metadata and if you add an [Include] plus an .Include() statement in the domain service retrieval query it pulls down this info.
eg:
Basically in EF 4 using WCF RIA for a Silverlight app, it defines 1:many relationships as an EntityCollection in metadata and if you add an [Include] plus an .Include() statement in the domain service retrieval query it pulls down this info.
eg:
[MetadataTypeAttribute(typeof(Clinic.ClinicMetadata))]
public partial class Clinic
{
[Include]
public EntityCollection<
Location
> Locations { get; set; }
...
}
and in the domain service:public IQueryable<
Clinic
> GetClinics()
{
return DataContext.Clinics
.Include("Locations");
}
and this works great. How do I do this in OpenAccess?? I tried setting the IsManaged property to true in the .rlinq file for the relation, and a metadata attribute, but it doesn't like the [Include]. What else do I need to do to make this just work and also reference in the Silverlight code as clinic.Locations?