Aproaching singleton connection class
        namespace AV.Connections
    {
    
        protected class MyConnection
        {
            protected MyConnection()
            {
                //
                // TODO: Add constructor logic here
                //
            }
            protected ConnectionStringSettings connectionSettings
            {
                get { return ConfigurationManager.ConnectionStrings["mySQLConnection"]; }
            }
    
            protected DbConnection connection
            {
                get { return new OdbcConnection(connectionSettings.ConnectionString); }
            }
    
            protected DbCommand command
            {
                get { return connection.CreateCommand(); }
            }
    
            protected DbParameter parameter
            {
                get { return command.CreateParameter(); }
            }
    
        }
    }


I was trying to create singleton class which could return connection objects as well as other related objects. The above was the approach I thought of. I am sure I am wrong somehow. Please point out the how? Or if not what's the best approach for this.
Aproaching singleton connection class
===

        namespace AV.Connections
    {
    
        protected class MyConnection
        {
            protected MyConnection()
            {
                //
                // TODO: Add constructor logic here
                //
            }
            protected ConnectionStringSettings connectionSettings
            {
                get { return ConfigurationManager.ConnectionStrings["mySQLConnection"]; }
            }
    
            protected DbConnection connection
            {
                get { return new OdbcConnection(connectionSettings.ConnectionString); }
            }
    
            protected DbCommand command
            {
                get { return connection.CreateCommand(); }
            }
    
            protected DbParameter parameter
            {
                get { return command.CreateParameter(); }
            }
    
        }
    }


I was trying to create singleton class which could return connection objects as well as other related objects. The above was the approach I thought of. I am sure I am wrong somehow. Please point out the how? Or if not what's the best approach for this.