123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Threading.Tasks;
- using System.Transactions;
- using Datory;
- using GxPress.Entity.Topic;
- namespace GxPress.Service.Implement.Topic
- {
- public partial class TopicService
- {
-
-
-
-
-
- public async Task<bool> DeleteAsync(int id)
- {
- try
- {
- using (TransactionScope transactionScope = new TransactionScope())
- {
-
- await _topicRepository.DeleteAsync(id);
-
-
- transactionScope.Complete();
- }
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- throw;
- }
- return true;
- }
- }
- }
|