public void InsertOrder(Order order) { _dbContext.Orders.Add(order); TakenProductsDataEvent takenProductsDataEvent = new TakenProductsDataEvent() { ProductsDetails = _converter.CommandToEvent(order.OrdersData) }; _eventEmitter.EmitTakenProductsDataEvent(takenProductsDataEvent); SaveChanges(); }