/// <summary>
        /// Deletes a AddressType record
        /// </summary>
        public static int Delete(AddressTypeDO DO)
        {
            SqlParameter _AddressTypeID = new SqlParameter("AddressTypeID", SqlDbType.VarChar);

            _AddressTypeID.Value = DO.AddressTypeID;

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

            return DataCommon.ExecuteScalar("[dbo].[AddressType_Delete]", _params, "dbo");
        }
        /// <summary>
        /// Creates a new AddressType record
        /// </summary>
        public static void Create(AddressTypeDO DO)
        {
            SqlParameter _AddressTypeID = new SqlParameter("AddressTypeID", SqlDbType.VarChar);

            _AddressTypeID.Value = DO.AddressTypeID;

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

            DataCommon.ExecuteNonQuery("[dbo].[AddressType_Insert]", _params, "dbo");
        }
        /// <summary>
        /// Gets all AddressType records
        /// </summary>
        public static AddressTypeDO[] GetAll()
        {
            SafeReader sr = DataCommon.ExecuteSafeReader("[dbo].[AddressType_GetAll]", new SqlParameter[] { }, "dbo");

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

            while(sr.Read()){

                AddressTypeDO obj = new AddressTypeDO();

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

                objs.Add(obj);
            }

            return objs.ToArray();
        }
        /// <summary>
        /// Selects AddressType records by PK
        /// </summary>
        public static AddressTypeDO[] GetByPK(String AddressTypeID)
        {
            SqlParameter _AddressTypeID = new SqlParameter("AddressTypeID", SqlDbType.VarChar);

            _AddressTypeID.Value = AddressTypeID;

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

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

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

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

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

                objs.Add(obj);
            }

            return objs.ToArray();
        }