A Generic Data Access Component using Factory Pattern

10123 Users read it.
by Raj Kumar (December 17, 2003)

Another way to solve this problem is to utilize the System.Activator class and a factory pattern to create the concrete provider classes as was pointed-out in Dan Fox's article "Design an Effective Data-Access Architecture" (.netmagazine, vol. 2, no. 7).  I took this idea and refined it a bit so that the only steps necessary to add a new provider to the factory is to add a new enum and the associated type values to the factory's static type arrays (a total of 5 lines of code).

Read it at the external site...

User Rating (11 votes)
0 reviews available
Author(s):Michael Bouck
User Level:Intermediate
Language:VB.NET
Platform:Windows
Product(s):VS.NET
Follow us on twitter Subscribe to our RSS feed
Activate your free membership today | Login | Currency