using Brainsbits.LDA; // create a new Conexion instance var connection = new Conexion("ldap://example.com"); // establish a connection to the LDAP server connection.Conectar("username", "password"); // create a new LDAP query var query = new LdapQuery("(&(objectClass=user)(sAMAccountName=john.doe))"); // execute the query within a transaction var results = connection.ExecuteReaderConTransaccion(query); // iterate through the search results foreach (var entry in results) { Console.WriteLine(entry.DN); }In this example, we first create a new Conexion instance and connect to the LDAP server using a set of credentials. We then create a new LDAP query that searches for all the user entries with a sAMAccountName attribute equals to "john.doe". Finally, we execute the query using the ExecuteReaderConTransaccion method, which returns a set of SearchResultEntry objects representing the LDAP entries that match the query criteria. We iterate through the results and print the DN of each matching entry. Overall, the Brainsbits.LDA package library provides a useful set of classes and methods to interact with LDAP directories, and the Conexion class is a key component of this library, providing a convenient API to connect to and execute queries against LDAP servers.