/// <summary>
        /// Updates a RegistrationStatus record and returns the number of records affected
        /// </summary>
        public static int Update(RegistrationStatusDO DO)
        {
            SqlParameter _RegistrationStatusID = new SqlParameter("RegistrationStatusID", SqlDbType.VarChar);
            
            _RegistrationStatusID.Value = DO.RegistrationStatusID;
            
            SqlParameter[] _params = new SqlParameter[] {
                _RegistrationStatusID
            };

            string pid = ConfigurationManager.AppSettings["ePermitDAL"];

            return DataCommon.ExecuteScalar("[dbo].[RegistrationStatus_Update]", _params, pid);
        }
        /// <summary>
        /// Creates a new RegistrationStatus record using async
        /// </summary>
        public static async Task CreateAsync(RegistrationStatusDO DO)
        {
            SqlParameter _RegistrationStatusID = new SqlParameter("RegistrationStatusID", SqlDbType.VarChar);
            
            _RegistrationStatusID.Value = DO.RegistrationStatusID;
            
            SqlParameter[] _params = new SqlParameter[] {
                _RegistrationStatusID
            };

            string pid = ConfigurationManager.AppSettings["ePermitDAL"];

            await DataCommon.ExecuteNonQueryAsync("[dbo].[RegistrationStatus_Insert]", _params, pid);
            
        }
        /// <summary>
        /// Selects RegistrationStatus records by PK
        /// </summary>
        public static async Task<RegistrationStatusDO[]> GetByPKAsync(String RegistrationStatusID)
        {

            SqlParameter _RegistrationStatusID = new SqlParameter("RegistrationStatusID", SqlDbType.VarChar);
			
            _RegistrationStatusID.Value = RegistrationStatusID;
			
            SqlParameter[] _params = new SqlParameter[] {
                _RegistrationStatusID
            };

            string pid = ConfigurationManager.AppSettings["ePermitDAL"];

            SafeReader sr = await DataCommon.ExecuteSafeReaderAsync("[dbo].[RegistrationStatus_GetByPK]", _params, pid);


            List<RegistrationStatusDO> objs = new List<RegistrationStatusDO>();
			
            while(sr.Read())
            {
                RegistrationStatusDO obj = new RegistrationStatusDO();
				
                obj.RegistrationStatusID = sr.GetString(sr.GetOrdinal("RegistrationStatusID"));
                

                objs.Add(obj);
            }

            return objs.ToArray();
        }
        /// <summary>
        /// Gets all RegistrationStatus records
        /// </summary>
        public static async Task<RegistrationStatusDO[]> GetAllAsync()
        {

            string pid = ConfigurationManager.AppSettings["ePermitDAL"];

            SafeReader sr = await DataCommon.ExecuteSafeReaderAsync("[dbo].[RegistrationStatus_GetAll]", new SqlParameter[] { }, pid);
            
            List<RegistrationStatusDO> objs = new List<RegistrationStatusDO>();
            
            while(sr.Read()){

                RegistrationStatusDO obj = new RegistrationStatusDO();
                
                obj.RegistrationStatusID = sr.GetString(sr.GetOrdinal("RegistrationStatusID"));
                


                objs.Add(obj);
            }

            return objs.ToArray();
        }