Framework: .NET 4, Entity Framework 4, Silverlight 4, RIA services
I'm trying to split my Entity Framework model into two domain service classes. The model is not complex - several tables. So I have created a single Entity Framework model.
I'd like to create two Domain service classes - each accessing a subset of the complete EF model.
I first create a single domain service class. RIA generates the DomainContext
in the SL4 application based on the Domain Service. However, when I add a second Domain Service class, RIA does not generate any of the Domain Contexts (so I am unable to use even the first one).
(Note: both domain services have EnableClientAccess
attribute set and both have at least one query.)
Why are the contexts not generated and how can this be solved? Am I missing something? Can RIA generate the contexts for two different domain services that use the same entity framework model?
It's seem like your entity is exposed by 2 DomainService, e.g. your have entity name
Company
and you have method that return Company in both of your Domain Service: