Exemplo n.º 1
0
 private async Task WriteRandomEventToStream(string stream, IEventStoreConnection connection)
 {
     var events = new List <CreateEvent>()
     {
         new CreateEvent()
         {
             Id        = Guid.NewGuid(),
             EventType = "TestType",
             IsJson    = true,
             Data      = Encoding.UTF8.GetBytes("{\"Key\": \"Value\"}"),
             MetaData  = Encoding.UTF8.GetBytes("{}")
         }
     };
     await connection.WriteEvents(events, stream, ExpectedEventNumber.Any).ConfigureAwait(false);
 }