Should we necessarily transform business entity to DC?

Topics: General Discussion Forum, July and December Releases Forum, Service Factory Modeling Edition Forum
Apr 1, 2008 at 12:56 PM
Some business entity are very simple,we just want to transfer them from server to client,must we transform them to DC?
Developer
Apr 1, 2008 at 3:00 PM
The guidance is to map you BEs to DCs. However, nothing stops you in WSSF from using directly your BEs as DCs assuming you modeled them in a DC model and generated the code.
Apr 1, 2008 at 3:03 PM
For these simple entities, I would suggest:

  1. moving the simple entities from BusinessEntities to your DataContracts project
  2. add the DataContract / DataMember attributes where appropriate
  3. add the entity types to your MessageContract classes (via partial classes)
  4. add reference in your BusinessLogic to DataContracts

Your Business Logic would reference your DataContracts directly in this case. This is a trade off for maintaining two identical object definitions and a translator between them. There is never one right way. Just the best way for your individual situation. :-)


baston wrote:
Some business entity are very simple,we just want to transfer them from server to client,must we transform them to DC?