public async Task AddAsync(IRegulation regulation) { if (await _regulationRepository.GetAsync(regulation.Id) != null) { throw new ServiceException("Regulation already exists."); } await _regulationRepository.AddAsync(regulation); }