public bool Conectar()
{
try {
//Simulo una clase singleton para que solo exista una conexion a la base de datos
if (conexionLegacy == null) {
conexionLegacy = factory.CreateConnection ();
} else
conexionLegacy.Close ();
conexionLegacy.ConnectionString = ConnectionString;
conexionLegacy.Open ();
return true;
} catch (Exception ex) {
RegistrarError (ex);
return false;
}
}