---
lang: en
title: 'API docs: context.resolutionsession.runwithbinding'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.context.resolutionsession.runwithbinding.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ResolutionSession](./context.resolutionsession.md) &gt; [runWithBinding](./context.resolutionsession.runwithbinding.md)

## ResolutionSession.runWithBinding() method

Run the given action with the given binding and session

<b>Signature:</b>

```typescript
static runWithBinding(action: ResolutionAction, binding: Readonly<Binding>, session?: ResolutionSession): any;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  action | <code>ResolutionAction</code> | A function to do some work with the resolution session |
|  binding | <code>Readonly&lt;Binding&gt;</code> | The current binding |
|  session | <code>ResolutionSession</code> | The current resolution session |

<b>Returns:</b>

`any`


