public void Handle(BrandDescriptionChangedEvent @event)
 {
     try
     {
         EventStore.Save(@event);
     }
     catch
     {
         throw;
     }
 }
Esempio n. 2
0
        public async Task ChangeBrandDescription(Guid brandId, string description)
        {
            try
            {
                var brand = await Repository.GetByKeyAsync <Brand>(brandId);

                brand.ChangeDescription(description);

                await Repository.SaveChangesAsync();

                var @event = new BrandDescriptionChangedEvent(brandId, description);
                EventBus.RaiseEvent(@event);
            }
            catch
            {
                throw;
            }
        }