Using Reflection to Load a Class in ASP.NET

Tagged with:

Last week, we took a look at creating a DAL that would allow us to swap out database providers without having to rewrite a lot of our code.  The only problem with the code I showed you is that you still have to change code whenever you swap databases.  This is not very flexible.

Today we are going to embellish this one more step so that all you should need to do is change an entry in the appSettings section of web.config and the database will be changed.

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Tagged with:
kick it on DotNetKicks.com

One Response to “Using Reflection to Load a Class in ASP.NET”

  1. Unique SQL Logins and SqlMembership Provider Says:

    […] Datasets ObjectDataSource and 3-Tier ASP.NETDatasets StoredProcedures and 3-Tier ASP.NETSwapping Out the Data Access LayerSwapping the Data Access Layer AbstractlyUsing Reflection to Load a Class in ASP.NET […]

Leave a Reply