In RIA-Silverlight 3ProgramIn the development architecture-1, the development of relevant programs for composite entities is too complex.
The architecture of applications added to the navigation attribute is updated as follows:
UI-businesscontex (entity)-domaincontext (entity)-domainservice-objectcontext-Database
The following is a small system. I have no good solutions for many systems, such as EDM objectcontext and domainservice.
1. Database: design the primary/foreign key relationships between tables. For more information, see the design of orders, order details, products, and customer tables in northwind.
2. objectcontext: a database can correspond to an EDM objectcontext.
3. domainservice: An EDM objectcontext corresponds to a domainservice, which can be implemented using the distribution class partial.
Note: the reason for the design of objectcontext and domainservice is that if you want to apply the navigation attribute on the Silverlight side, the related entity must be located in a domainservice. However, some entity will run through the entire system, or the requirement is unclear about which domainservie The entity should be placed in. Currently, I have not figured out how to design objectcontext and domainservice. This is just a lazy method.
4. businesscontex (entity)-domaincontext (entity): according to the above design, domaincontext may have many entity and related operations. To facilitate UI use, businesscontex will be like a subset of domaincontext, it is used to operate the entity of a specific business. It is mainly the encapsulation of load and submit.
5. UI: communicates with businesscontex entities or composite entities. entityqurey cannot appear in the UI.