public Customer AuthenticateLogin(string email, string password)
        {
            Customer _customer = null;

            try
            {
                string pwhash = HashSHA256(password);
                if (1 == CustomerAccessor.VerifyLoginInfo(email, pwhash))
                {
                    password = null;

                    _customer = CustomerAccessor.RetrieveCustomerWithEmail(email);
                }
                else
                {
                    throw new ApplicationException("An error has occurred.");
                }
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Incorrect email or password.");
            }

            return(_customer);
        }
        public int?RetrieveCustomerIdByEmail(string email)
        {
            int?id = 0;

            try
            {
                id = CustomerAccessor.RetrieveCustomerWithEmail(email).CustomerID;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(id);
        }