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

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

            return DataCommon.ExecuteScalar("[dbo].[SalutationType_Update]", _params, pid);
        }
        /// <summary>
        /// Creates a new SalutationType record using async
        /// </summary>
        public static async Task CreateAsync(SalutationTypeDO DO)
        {
            SqlParameter _SalutationID = new SqlParameter("SalutationID", SqlDbType.VarChar);
            
            _SalutationID.Value = DO.SalutationID;
            
            SqlParameter[] _params = new SqlParameter[] {
                _SalutationID
            };

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

            await DataCommon.ExecuteNonQueryAsync("[dbo].[SalutationType_Insert]", _params, pid);
            
        }
        /// <summary>
        /// Selects SalutationType records by PK
        /// </summary>
        public static async Task<SalutationTypeDO[]> GetByPKAsync(String SalutationID)
        {

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

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

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


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

                objs.Add(obj);
            }

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

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

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

                SalutationTypeDO obj = new SalutationTypeDO();
                
                obj.SalutationID = sr.GetString(sr.GetOrdinal("SalutationID"));
                


                objs.Add(obj);
            }

            return objs.ToArray();
        }