public NpgSqlExecuteXY() { DbConn = DbConnPool["DefautConnectionString"].GetObject(); if (DbConn == null) { throw new Exception("Sql Connection obj is NULL,Please Look LogOut ERROR Msg!!"); } Key = "DefautConnectionString"; Command = DbCommandPool.GetObject(); Command.Connection = DbConn; }
public NpgSqlExecuteXY(string key) { DbConn = DbConnPool[key].GetObject(); Key = key; if (DbConn == null) { throw new Exception( string.Format("Sql Connection obj is NULL,Please Look LogOut ERROR Msg!! FOR KEY:{0}", key)); } Command = DbCommandPool.GetObject(); Command.Connection = DbConn; }