public class MyConnection { #region Declaration public string ConnectionString = ""; #endregion #region Methods public IDbConnection GetConnection() { return this.GetConnection(""); } public IDbConnection GetConnection(string tConnectionString) { string cConnection = tConnectionString; if(tConnectionString == "") cConnection = ConfigurationSettings.AppSettings["ConnectionString"]; SqlConnection conn = new SqlConnection(cConnection); this.ConnectionString = cConnection; return conn; } #endregion }The ConfigurationSettings in the above code is from 1.1. It's slightly different in 2.0 (don't recall it off the top of my head), but that's mainly because the way the settings are written in the config files for 2.0 are slightly different. You can do it either way. Look it up in the docs. I'll try to help if you have questions.