> ## Documentation Index
> Fetch the complete documentation index at: https://superofficeas-worktree-351-fix-webapi-escaped-anchors.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a contact through entities layer

> How to get a Contact through Entities layer.

Getting a contact through the **entities layer** is pretty straightforward. You need to import the `SuperOffice.CRM.Entities` namespace.

The following example shows how it is done.

```csharp theme={null}
using SuperOffice;
using SuperOffice.CRM.Entities;
using(SoSession mySession = SoSession.Authenticate("SAL0", ""))
{
  //Get a contact through Idx class
  Contact contactThroughIdx = Contact.GetFromIdxContactId(3);

  //Access the Name property
  string name = contactThroughIdx.Name;
}
```

When retrieving a `Contact` entity through an Idx class, you have to pass the ID of the entity. Then all its properties will be retrieved from the database and kept in memory. This allows you to access the properties.

You can alternatively [use the services layer][1].

[1]: ../../../web-services/howto/company/get-contact-via-services-layer
