bus. & service ent trans reversed in add svc agt

Topics: CAB & Smart Client Software Factory
Jul 26, 2006 at 7:13 AM
originally posted by: asanford

in the "SmartClientDevelopmentSolution1" example that comes with the 2006-07-24 "add service agent" guidance, it seems that the entity translators defined in the proxy project (such as AddressTranslator, CustomerTranslator, etc.) utilize their base class EntityMapperTranslator backwards (they seem to reverse the business and service entity template - I mean generic type - parameters.) While this works because the translators have also inverted the BusinessToService() and ServiceToBusiness() methods (for example, BusinessToService() actually takes a service object and returns a business object!), it is very confusing.
Jul 27, 2006 at 3:55 AM
originally posted by: marianoszklanny

Hi, thanks for the feedback!

You are correct, there is a bug in the sample solution: the type parameters are reversed.

To better understand entity translators, you should look at the Bank Branch Reference Implementation which contains correct implementations.

You can also update AddressTranslator.cs, CustomerSearchCriteriaTranslator.cs, and CustomerTranslator.cs files in Module1.ServiceProxies project to fix the bug.

However, you don't need to change the Guidance Package.

Cheers,
Mariano Szklanny
http://staff.southworks.net/mariano
Jul 27, 2006 at 12:48 PM
originally posted by: asanford

thanks!