public static BaseExchangeRateModel ToBaseExchangeRate(this ExchangeRate exchangeRate)
        {
            BaseExchangeRateModel _result = new BaseExchangeRateModel();

            _result.Id           = exchangeRate.Id;
            _result.CurrencyId   = exchangeRate.CurrencyId;
            _result.Date         = exchangeRate.Date;
            _result.Rate         = exchangeRate.Rate;
            _result.Narration    = exchangeRate.Narration;
            _result.CreatedDate  = exchangeRate.CreatedDate;
            _result.ModifiedDate = exchangeRate.ModifiedDate;
            return(_result);
        }
        public static ExchangeRate ToExchangeRate(this BaseExchangeRateModel exchangeRate)
        {
            ExchangeRate _result = new ExchangeRate();

            if (exchangeRate.Id.HasValue)
            {
                _result.Id = exchangeRate.Id.GetValueOrDefault();
            }
            _result.CurrencyId   = exchangeRate.CurrencyId;
            _result.Date         = exchangeRate.Date;
            _result.Rate         = exchangeRate.Rate;
            _result.Narration    = exchangeRate.Narration;
            _result.CreatedDate  = exchangeRate.CreatedDate;
            _result.ModifiedDate = exchangeRate.ModifiedDate;
            return(_result);
        }