public PrimeNumber Update(PrimeNumber primeNumber, int index, long primeValue) { if (primeNumber == null) { throw new CalculationDomainModelException("primeNumber cannot be null"); } primeNumber.Index = index; primeNumber.PrimeValue = primeValue; using (var transactionScope = new TransactionScope()) { this.primeNumberRepository.Update(primeNumber); transactionScope.Complete(); } return(primeNumber); }