public List<Domain.DTO.LeaseTimeDTO> GetAllLeaseTime()
 {
     List<Ciklum.ATEA.Finance.Service.Domain.DTO.LeaseTimeDTO> lstLeaseTime = new List<Domain.DTO.LeaseTimeDTO>();
     try
     {
         using (var context = new Ciklum.Atea.Finance.Service.Domain.EntityModel.FinanceDBEntities())
         {
             System.Data.Objects.ObjectResult<Ciklum.Atea.Finance.Service.Domain.EntityModel.LeaseTime_GetAll_Result> lst = context.LeaseTime_GetAll();
             Domain.DTO.LeaseTimeDTO objLeaseTime = null;
             foreach (var item in lst)
             {
                 objLeaseTime = new Domain.DTO.LeaseTimeDTO();
                 objLeaseTime.LeaseTimeID = item.ID;
                 objLeaseTime.LeaseTime = item.Months;
                 objLeaseTime.LeaseTimeDescription = item.Description;
                 lstLeaseTime.Add(objLeaseTime);
                 objLeaseTime = null;
             }
         }
     }
     catch (Exception ex)
     {
         lgLogging.LogFatalException(ex);
     }
     return lstLeaseTime;
 } 
 public List<Domain.DTO.InterestRateDTO> GetAllInterestRate()
 {
     List<Ciklum.ATEA.Finance.Service.Domain.DTO.InterestRateDTO> lstInterestRate = new List<Domain.DTO.InterestRateDTO>();
     try
     {
         using (var context = new Ciklum.Atea.Finance.Service.Domain.EntityModel.FinanceDBEntities())
         {
             System.Data.Objects.ObjectResult<Ciklum.Atea.Finance.Service.Domain.EntityModel.InterestRate_GetAll_Result> lst = context.InterestRate_GetAll();
             Domain.DTO.InterestRateDTO objInterestRate = null;
             foreach (var item in lst)
             {
                 if (item.IsActive == 0)
                 {
                     continue;
                 }
                 objInterestRate = new Domain.DTO.InterestRateDTO();
                 objInterestRate.CountryLeaseTimeID = item.CountyLeaseTimeID;
                 objInterestRate.CountryID = item.CountryID;
                 objInterestRate.CountryName = item.CountryName;
                 objInterestRate.CountryCurrency = item.CountryCurrency;
                 objInterestRate.RoundCurrency = item.RoundCurrency;
                 objInterestRate.CountryEmail = item.CountryEmail;
                 objInterestRate.LeaseTimeID = item.LeaseTimeID;
                 objInterestRate.LeaseTime = item.LeaseTime.ToString();
                 objInterestRate.CostOfFund = item.CostOfFunds == String.Empty ? "0" : item.CostOfFunds;
                 objInterestRate.Margin = item.Margin == String.Empty ? "0" : item.Margin; ;
                 objInterestRate.FunderMargin = item.FunderMargin == null || item.FunderMargin == String.Empty ? "0" : item.FunderMargin; ;
                 objInterestRate.StartDate = item.StartDate;
                 objInterestRate.IRR = item.IRR;
                 objInterestRate.EndDate = item.EndDate;
                 objInterestRate.IsActive = item.IsActive == 0 ? false : true;
                 lstInterestRate.Add(objInterestRate);
                 objInterestRate = null;
             }
         }
     }
     catch (Exception ex)
     {
         lgLogging.LogFatalException(ex);
     }
     return lstInterestRate;
 }