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)); }
public async Task <IRegulation> GetAsync(string regulationId) { IRegulation regulation = await _regulationRepository.GetAsync(regulationId); if (regulation == null) { throw new ServiceException("Regulation not found."); } return(regulation); }