/// <summary>
 /// Close the connection of the specified dbProvider.
 /// dbProvider has an active transaction , the connection will not be closed.
 /// </summary>
 /// <param name="dbProvider"></param>
 internal static void ClosseConnection(IDbProvider dbProvider)
 {
     try
     {
         if (dbProvider.Transaction == null)
         {
             dbProvider.CloseConnection();
         }
         else
         {
             //ignore
         }
     }
     catch (Exception ex)
     {
         //ignore the fact that i cant close the connection
         logger.Warn(ex.Message);
     }
 }
Exemplo n.º 2
0
 public void CloseConnection()
 {
     _idbProvider.CloseConnection();
 }