public int UpdateCurrencyExchangeRates()
        {

            try
            {
                //new up everything
                IMailService mailerService = new MaintainanceMailer();
                CurrencyExchangeService ces = new CurrencyExchangeService(mailerService);
                

                //get all the currencies
                using (var _db = new PortVillasContext())
                {

                    var currencies = _db.CurrencyExchanges.ToList();

                    foreach (var currency in currencies)
                    {
                        ces.UpdateCurrency(currency);
                    }

                }

                return 0;
            }
            catch (Exception ex)
            {

                
                
            }
            return -1;


        }
        public void TestCurrencyService()
        {
            //new up everything
            IMailService mailerService = new MaintainanceMailer();
            CurrencyExchangeService ces = new CurrencyExchangeService(mailerService);

            //send a cheeky testmail


            //get all the currencies
            using (var _db = new PortVillasContext())
            {

                var currencies = _db.CurrencyExchanges.ToList();

                foreach (var currency in currencies)
                {
                    ces.UpdateCurrency(currency);
                }

            }

        }
        public void TestMaintainanceMailService()
        {
            IMailService mailerService = new MaintainanceMailer();
            CurrencyExchangeService ces = new CurrencyExchangeService(mailerService);

            mailerService.Mail("*****@*****.**", "Help");
        }