@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 826 B
Markdown
lang: en
title: 'API docs: repository.entity.getidof'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.entity.getidof.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [Entity](./repository.entity.md) > [getIdOf](./repository.entity.getidof.md)
## Entity.getIdOf() method
Get the identity value for a given entity instance or entity data object.
<b>Signature:</b>
```typescript
static getIdOf(entityOrData: AnyObject): any;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| entityOrData | <code>AnyObject</code> | The data object for which to determine the identity value. |
<b>Returns:</b>
`any`