A Generic Data Access Component using Factory Pattern
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...
| Michael Bouck | |
| Intermediate | |
| Language: | VB.NET |
| Platform: | Windows |
| VS.NET |






