I have three data sources and a web config setting. Initially I select data source according to web config setting but in case this data source return null or 0 value, then I need to create 2 data source class object and try to get data and so on for 3 data source as well. Till now I use Factory pattern to select data source class object, Is there any better solution for it to switch data source object at run time till no data found.
Aucun commentaire:
Enregistrer un commentaire