public CapexCost[] GetAllCapexCosts()
        {
            return(ExecuteFaultHandledOperation(() =>
            {
                var groupNames = new List <string>()
                {
                    BudgetModuleDefinition.GROUP_ADMINISTRATOR, BudgetModuleDefinition.GROUP_BUSINESS
                };
                AllowAccessToOperation(BudgetModuleDefinition.SOLUTION_NAME, groupNames);

                ICapexCostRepository capexCostRepository = _DataRepositoryFactory.GetDataRepository <ICapexCostRepository>();

                IEnumerable <CapexCost> capexCost = capexCostRepository.Get().ToArray();

                return capexCost.ToArray();
            }));
        }
        public CapexCost GetCapexCost(int capexCostId)
        {
            return(ExecuteFaultHandledOperation(() =>
            {
                var groupNames = new List <string>()
                {
                    BudgetModuleDefinition.GROUP_ADMINISTRATOR, BudgetModuleDefinition.GROUP_BUSINESS
                };
                AllowAccessToOperation(BudgetModuleDefinition.SOLUTION_NAME, groupNames);

                ICapexCostRepository capexCostRepository = _DataRepositoryFactory.GetDataRepository <ICapexCostRepository>();

                CapexCost capexCostEntity = capexCostRepository.Get(capexCostId);
                if (capexCostEntity == null)
                {
                    NotFoundException ex = new NotFoundException(string.Format(" CapexCost with ID of {0} is not in database", capexCostId));
                    throw new FaultException <NotFoundException>(ex, ex.Message);
                }

                return capexCostEntity;
            }));
        }