public BondComputation[] GetBondComputationResultbyRefNo(string refNo)
        {
            return(ExecuteFaultHandledOperation(() =>
            {
                var groupNames = new List <string>()
                {
                    GROUP_ADMINISTRATOR, GROUP_USER
                };
                AllowAccessToOperation(SOLUTION_NAME, groupNames);

                IBondComputationRepository bondComputationRepository = _DataRepositoryFactory.GetDataRepository <IBondComputationRepository>();

                BondComputation[] bondComputations = bondComputationRepository.Get().Where(c => c.RefNo == refNo).OrderBy(c => c.Day).ToArray();

                return bondComputations.ToArray();
            }));
        }
        //public IEnumerable<BondComputation> GetBondComputationResultbyRefNo(string refNo)
        //{
        //    return ExecuteFaultHandledOperation(() =>
        //    {
        //        var groupNames = new List<string>() { GROUP_ADMINISTRATOR, GROUP_USER };
        //        AllowAccessToOperation(SOLUTION_NAME, groupNames);

        //       // IBondComputationRepository bondComputationMapRepository = _DataRepositoryFactory.GetDataRepository<IBondComputationRepository>();

        //        IEnumerable<BondComputation> bondComputation = new  IEnumerable<BondComputation>();

        //        BondComputationRepository  bondComputationRepository = new BondComputationRepository();

        //        bondComputation = bondComputationRepository.GetBondPeriodicScheduleRefNos(refNo);


        //       // BondComputation bondComputationEntity = bondComputationMapRepository
        //        if (bondComputation == null)
        //        {
        //            NotFoundException ex = new NotFoundException(string.Format("BondComputationResult with ID of {0} is not in database", refNo));
        //            throw new FaultException<NotFoundException>(ex, ex.Message);
        //        }

        //        return bondComputation;
        //    });
        //}

        public BondComputation[] GetAllBondComputations()
        {
            return(ExecuteFaultHandledOperation(() =>
            {
                var groupNames = new List <string>()
                {
                    GROUP_ADMINISTRATOR, GROUP_USER
                };
                AllowAccessToOperation(SOLUTION_NAME, groupNames);

                IBondComputationRepository bondComputationRepository = _DataRepositoryFactory.GetDataRepository <IBondComputationRepository>();

                IEnumerable <BondComputation> bondComputations = bondComputationRepository.Get().ToArray();

                return bondComputations.ToArray();
            }));
        }