public void Delete(TEntity entity)
 {
     using (var transaction = new TransactionScope())
     {
         decratedCrud.Delete(entity);
         transaction.Complete();
     }
 }
        public void Delete(TEntity entity)
        {
            Console.WriteLine("Are you sure you want to delete items");
            var keyInfo = Console.ReadKey();

            if (keyInfo.Key == ConsoleKey.Y)
            {
                using (var transaction = new TransactionScope())
                {
                    decratedCrud.Delete(entity);
                    transaction.Complete();
                }
            }
        }
示例#3
0
 //logginhg functions
 public void Delete(TEntity entity)
 {
     decoratedCrud.Delete(entity);
 }
 public void Delete(TEntity entity)
 {
     log.LogMessage(string.Format("Deleting entity of type {0}", typeof(TEntity).Name));
     decoratedCrud.Delete(entity);
 }
 public void Delete(TEnity entity)
 {
     log.Info($"Deleting entity of type {typeof(TEnity).Name}");
     decoratedCrud.Delete(entity);
 }