コード例 #1
0
        public async Task CloseAsync(Purchase purchase)
        {
            purchase.Close();

            _repository.Update(purchase);

            purchase.AddEvent(new PurchaseClosedEvent(purchase.Id));

            await _repository.UnitOfWork.CommitAsync();
        }