Ejemplo n.º 1
0
 public static void RemoveEntry(LdapEntry ldapEntry, LdapConnectionProvider ldapConnectionProvider)
 {
     using (var connection = ldapConnectionProvider.GetConnection())
     {
         connection.Delete(ldapEntry.DN);
     }
 }
Ejemplo n.º 2
0
 public static LdapEntry CreateTestUser(string firstName, string lastName, string baseDn, LdapConnectionProvider ldapConnectionProvider)
 {
     using (var connection = ldapConnectionProvider.GetConnection())
     {
         var ldapEntry = CreateNewLdapEntry(firstName, lastName, baseDn);
         connection.Add(ldapEntry);
         return(ldapEntry);
     }
 }