Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
This is basically the approach that we have taken on some of our classes within the framework such as the QueryInfo and some other base classes. Also, in our medical software we have some classes that are used for different databases such as SQL and VFP (for the older tables) but use the same classes. Rather than using a Generic, we will create a class that we can pass over a DbCommand then based upon which database we will talk to will make any adjustments to the command (i.e. VFP requires an ORDER BY when using the TOP statement, etc) before executing the query. This can become a very long topic, but yes, it is possible to create a class so that you can write your BO logic in a more "generic" manner so that you can swap back-end databases, but it will require some effort on your part up front to create the classes that will house this logic.
|