---
title: "Session: How to Customize the Identity Property Lookup for Entities"
url: "https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-customize-identity-property-lookup-for-entities"
version: "6.2"
language: "csharp"
---

# Session: How to Customize the Identity Property Lookup for Entities

> Client language: C#. Also available for [Java](https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-customize-identity-property-lookup-for-entities.java.md), [PHP](https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-customize-identity-property-lookup-for-entities.php.md), [Node.js](https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-customize-identity-property-lookup-for-entities.nodejs.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

The client must know which property of your entity is considered as an identity. By default, it always looks for the `Id` property (case-sensitive). This behavior can be changed by overwriting one of our conventions called `FindIdentityProperty`.

## Syntax

```csharp
Func<MemberInfo, bool> FindIdentityProperty { get; set; }
```

`MemberInfo` will represent the member of a stored entity, and return value (bool) will indicate if given member is an identity property.

## Example

The simplest example would be to check if the property name is equal to 'Identifier'.

```csharp
store.Conventions.FindIdentityProperty = memberInfo => memberInfo.Name == "Identifier";
```

## See also

- [Conventions](https://docs.ravendb.net/6.2/client-api/configuration/conventions.md)
- [How to Customize ID Generation for Entities](https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-customize-id-generation-for-entities.md)
- [How to Customize Collection Assignment for Entities](https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-customize-collection-assignment-for-entities.md)
- [Document Identifier Generation](https://docs.ravendb.net/6.2/server/kb/document-identifier-generation.md)
