# Events Store (/sdks/csharp/reference/events-store)



Persist events with `SendEventStoreAsync` and replay them with `SubscribeToEventsStoreAsync`, configuring `StartPosition` and start value fields on the subscription object.

## SendEventStoreAsync [#sendeventstoreasync]

```csharp
Task<EventStoreResult> SendEventStoreAsync(EventStoreMessage message, CancellationToken ct = default);
```

## SubscribeToEventsStoreAsync [#subscribetoeventsstoreasync]

```csharp
IAsyncEnumerable<EventStoreReceived> SubscribeToEventsStoreAsync(
    EventStoreSubscription subscription, CancellationToken ct = default);
```

**EventStoreSubscription** adds:

| Property                | Type                      | Description                                                             |
| ----------------------- | ------------------------- | ----------------------------------------------------------------------- |
| `StartPosition`         | `EventStoreStartPosition` | Replay start enum                                                       |
| `StartSequence`         | `long?`                   | Sequence number; required when `StartPosition` is `StartAtSequence`     |
| `StartTime`             | `DateTimeOffset?`         | Point in time; required when `StartPosition` is `StartAtTime`           |
| `StartTimeDeltaSeconds` | `int?`                    | Seconds before now; required when `StartPosition` is `StartAtTimeDelta` |

## Quick Usage [#quick-usage]

```csharp title="EventsStore.cs"
await client.SendEventStoreAsync(new EventStoreMessage
{
    Channel = "audit",
    Body = payload,
});
```

## See Also [#see-also]

* [Events Store Examples](/sdks/csharp/how-to/events-store/)
* [Events Store pattern](/learn/events-store/getting-started)
* [C# SDK Getting Started](/sdks/csharp)
