# EventHubBatchContainer.UpdateEventData(EventData, Serializer, StreamId, IEnumerable&lt;T&gt;, Dictionary&lt;string, object&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubbatchcontainer/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubbatchcontainer/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubBatchContainer.cs#L120-L122)

```csharp
public static void UpdateEventData<T>(EventData eventData, Serializer bodySerializer, StreamId streamId, IEnumerable<T> events, Dictionary<string, object> requestContext)
```

Updates the event data with the events list and its context.

### Parameters

- `eventData` (`EventData`): The `Azure.Messaging.EventHubs.EventData` instance to update with a new body and context.
- `bodySerializer` (`Serializer`): The serializer to use for creating the event body payload.
- `streamId` (`StreamId`): The stream identifier to associate with the event context.
- `events` (`IEnumerable<T>`): The events list to use for the payload.
- `requestContext` (`Dictionary<string, object>`): The request context to associate with the event.
