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?
You would typically use a Domain Service for a domain of information (i.e. related entities).
That will usually be either:
- all/most tables/entities, or
- groups of closely related tables/entities, or
- the odd single table/entity
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.
精彩评论