Convert from Self-servicing to Adapter

Posts   
 
    
JayBee
User
Posts: 282
Joined: 28-Dec-2006
# Posted on: 30-Mar-2008 23:55:56   

Hi all,

Currently I'm using Self-servicing. Due to some new requirements, I have to add some new functionality to a web-application and retain data from another database. The requirement is to gather data from 2 databases running on the same server (SQLServer 2000).

The documentation point out that I have to use the Adapter framework.

What is the general approach to convert / change from Self-servicing to Adapter without having to change to much code in my application?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 31-Mar-2008 05:27:47   

Well, simply open the designer and generate using the Adapter Template Set Group. Maintaining your custom code at partial classes facilitates things. Then you have to do some refactoring with the differences in your custom or GUI code, for example: - IEntity2 instead of IEntity - Some predicate objects receives an EntityFactory object in Adapter Template. - In Adapter the filter generally is an IRelationPredicate bucket, in SS you pass IPredicateExpression. - Obviously it could be that exist breaking changes at your Business/GUI layer (the way you fetch/save data). - Due to LLBLGen design, migrating the Validators and Auditors is pretty easy.

In general and in my own experience, this is easy, though it depends upon your actual design (of course).

David Elizondo | LLBLGen Support Team