コード例 #1
0
        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
            });
        }
コード例 #2
0
 public async Task InsertAsync(BaseEventEntity entity) => await _datastore.InsertAsync(entity);