---
url: /nestjs-odata/api/generated/functions/runWithODataBatchPart.md
---
# Function: runWithODataBatchPart()

> **runWithODataBatchPart**<`T`>(`part`, `fn`): `T`

Defined in: [batch/batch-dispatch.ts:70](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/batch/batch-dispatch.ts#L70)

Runs `fn` with `part` as the current `$batch` operation (see [getODataBatchPart](getODataBatchPart.md)).

## Type Parameters

### T

`T`

## Parameters

### part

[`ODataBatchPartContext`](../interfaces/ODataBatchPartContext.md)

### fn

() => `T`

## Returns

`T`
