Пример #1
0
 /// <summary>
 /// Creates the new connection.
 /// </summary>
 /// <returns></returns>
 protected IConnection CreateNewConnection()
 {
     var connection = new Connection(ConnectionString);
     try
     {
         if (!Authenticate(connection))
         {
             Close(connection);
         }
     }
     catch (Exception)
     {
         Close(connection);
         throw;
     }
     return connection;
 }