コード例 #1
0
        public async Task <IEnumerable <IClientRegulation> > GetByRegulationIdAsync(string regulationId)
        {
            IRegulation result = await _regulationRepository.GetAsync(regulationId);

            if (result == null)
            {
                throw new ServiceException("Regulation not found.");
            }

            return(await _clientRegulationRepository.GetByRegulationIdAsync(regulationId));
        }
コード例 #2
0
        public async Task <IRegulation> GetAsync(string regulationId)
        {
            IRegulation regulation = await _regulationRepository.GetAsync(regulationId);

            if (regulation == null)
            {
                throw new ServiceException("Regulation not found.");
            }

            return(regulation);
        }