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

                ICapexCategoryRepository capexCategoryRepository = _DataRepositoryFactory.GetDataRepository <ICapexCategoryRepository>();

                IEnumerable <CapexCategory> capexCategorys = capexCategoryRepository.Get().ToArray();

                return capexCategorys.ToArray();
            }));
        }
        public CapexCategory GetCapexCategory(int capexCategoryId)
        {
            return(ExecuteFaultHandledOperation(() =>
            {
                var groupNames = new List <string>()
                {
                    BudgetModuleDefinition.GROUP_ADMINISTRATOR, BudgetModuleDefinition.GROUP_BUSINESS
                };
                AllowAccessToOperation(BudgetModuleDefinition.SOLUTION_NAME, groupNames);

                ICapexCategoryRepository capexCategoryRepository = _DataRepositoryFactory.GetDataRepository <ICapexCategoryRepository>();

                CapexCategory capexCategoryEntity = capexCategoryRepository.Get(capexCategoryId);
                if (capexCategoryEntity == null)
                {
                    NotFoundException ex = new NotFoundException(string.Format("CapexCategory with ID of {0} is not in database", capexCategoryId));
                    throw new FaultException <NotFoundException>(ex, ex.Message);
                }

                return capexCategoryEntity;
            }));
        }