コード例 #1
0
        public async Task AddAsync(IRegulation regulation)
        {
            if (await _regulationRepository.GetAsync(regulation.Id) != null)
            {
                throw new ServiceException("Regulation already exists.");
            }

            await _regulationRepository.AddAsync(regulation);
        }