public async Task CloseAsync(Purchase purchase) { purchase.Close(); _repository.Update(purchase); purchase.AddEvent(new PurchaseClosedEvent(purchase.Id)); await _repository.UnitOfWork.CommitAsync(); }