public void delete(long Details_id) { try { using (TransactionScope tx = new TransactionScope(TransactionScopeOption.Required)) { var DetailCategory = _detailsRepository.getById(Details_id); if (DetailCategory == null) { throw new ItemNotFoundException($"Details category with id {Details_id} doesnot exist."); } _detailsRepository.delete(DetailCategory); tx.Complete(); } } catch (Exception) { throw; } }