public void Post([FromBody] JObject value) { // example of handling an event var orderEvent = value.ToObject <OrderEvent>(); var orderInfo = JsonConvert.DeserializeObject <OrderEventData>(orderEvent.Body); if (string.Equals(orderEvent.EventType, "OrderCreated", StringComparison.OrdinalIgnoreCase)) { var email = new Email { Body = $"New order created with OrderID {orderInfo.OrderId}!", }; _emailRepository.Create(email); } _orderRepository.AcknowledgeEvent(orderEvent.EventId); }