silverlightwcfwcf-ria-servicesdomainservices

Silverlight + RIA Entity Domain Service best practice: How many entities per domain?


I have a database with a gazillion entities, I watched Tim Heuer's video about Silverlight & RIA Services, and he explained how to generate a DomainService.

My question is, should I use many domain services for each entity or merge them all along with all their queries into one big DomainService?


Solution

  • You would typically use a Domain Service for a domain of information (i.e. related entities).

    That will usually be either:

    With RIA services it is certainly easier to import them all at once into a single model and have RIA spit out one (very large) domain service file.

    Make sure you try out the new RIA Services SP1 (now in Beta) as it now supports complex types and some other new stuff.