public async Task InsertAsync(Product product) { var entity = _mapper.Map <ProductEntity>(product); await _dataStore.InsertAsync(entity); await _eventsRepository.InsertAsync(new ProductAddedEvent { AggregateId = product.ProductId, NewProduct = entity }); }
public async Task InsertAsync(BaseEventEntity entity) => await _datastore.InsertAsync(entity);