/// <summary>
        /// Deletes a MineSiteTopic record
        /// </summary>
        public static int Delete(MineSiteTopicDO DO)
        {
            SqlParameter _MineSiteTopicID = new SqlParameter("MineSiteTopicID", SqlDbType.VarChar);

            _MineSiteTopicID.Value = DO.MineSiteTopicID;

            SqlParameter[] _params = new SqlParameter[] {
                _MineSiteTopicID
            };

            return DataCommon.ExecuteScalar("[dbo].[MineSiteTopic_Delete]", _params, "dbo");
        }
        /// <summary>
        /// Creates a new MineSiteTopic record
        /// </summary>
        public static void Create(MineSiteTopicDO DO)
        {
            SqlParameter _MineSiteTopicID = new SqlParameter("MineSiteTopicID", SqlDbType.VarChar);

            _MineSiteTopicID.Value = DO.MineSiteTopicID;

            SqlParameter[] _params = new SqlParameter[] {
                _MineSiteTopicID
            };

            DataCommon.ExecuteNonQuery("[dbo].[MineSiteTopic_Insert]", _params, "dbo");
        }
        /// <summary>
        /// Gets all MineSiteTopic records
        /// </summary>
        public static MineSiteTopicDO[] GetAll()
        {
            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[MineSiteTopic_GetAll]", new SqlParameter[] { }, "dbo");

            List<MineSiteTopicDO> objs = new List<MineSiteTopicDO>();

            while(sr.Read()){

                MineSiteTopicDO obj = new MineSiteTopicDO();

                obj.MineSiteTopicID = sr.GetString(sr.GetOrdinal("MineSiteTopicID"));

                objs.Add(obj);
            }

            return objs.ToArray();
        }
        /// <summary>
        /// Selects MineSiteTopic records by PK
        /// </summary>
        public static MineSiteTopicDO[] GetByPK(String MineSiteTopicID)
        {
            SqlParameter _MineSiteTopicID = new SqlParameter("MineSiteTopicID", SqlDbType.VarChar);

            _MineSiteTopicID.Value = MineSiteTopicID;

            SqlParameter[] _params = new SqlParameter[] {
                _MineSiteTopicID
            };

            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[MineSiteTopic_GetByPK]", _params, "dbo");

            List<MineSiteTopicDO> objs = new List<MineSiteTopicDO>();

            while(sr.Read())
            {
                MineSiteTopicDO obj = new MineSiteTopicDO();

                obj.MineSiteTopicID = sr.GetString(sr.GetOrdinal("MineSiteTopicID"));

                objs.Add(obj);
            }

            return objs.ToArray();
        }