> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a list of people using entities

> How to retrieve a list of people using entities.

The below example demonstrates the use of entities in retrieving a list of persons for a given contact.

```csharp theme={null}
using SuperOffice.CRM.Entities;
using SuperOffice;
using(SoSession mySession = SoSession.Authenticate("SAL0",""))
{
//retrieve the contact that the person we want belongs to
  Contact myContact = Contact.GetFromIdxContactId(21);
  //retrieve the person collection
  PersonCollection myPersons = myContact.Persons;
  if (myPersons.Count > 0)
  {
    //Iterate through the persons collection and show the name in a combo box
    foreach (Person myPerson in myPersons)
    {
      cmbPersonName.Items.Add(myPerson.Firstname + " " + myPerson.Lastname);
    }
  }
}
```

In the above example, we retrieve the contact of the person we want to retrieve. Since we are retrieving an entity it contains the person that belongs to it as a property so that we can take the person to a person's collection.

Once we have the persons in the person's collection we can iterate through it access any of its properties. In the above example, we are accessing the `FirstName` and the `LastName` property and showing them in a combo box.


## Related topics

- [How to retrieve members of a specific selection using entities](/en/api/search/selection/entity/get-selection-members-entity.md)
- [Retrieving list of persons with ContactAgent](/en/api/web-services/howto/contact/get-persons-contactagent.md)
- [How to retrieve members of a specific selection using services](/en/api/search/selection/services/get-selection-members-services.md)
- [How to list all selected interests for a contact (services)](/en/api/web-services/howto/company/get-interests-for-contact-services.md)
- [Get a CategoryList using the ListAgent](/en/api/web-services/howto/company/get-catlist-listagent.md)
- [How to retrieve members of a specific selection using archive provider](/en/api/search/selection/archive/get-selection-members-provider.md)
- [Specialized lists](/en/admin/lists/specialized-lists.md)
