开发者

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

开发者 https://www.devze.com 2023-01-23 17:13 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消