public void Consume(BonusCreated message) { _repository.Bonuses.Add(new Interface.Data.Bonus { Id = message.AggregateId, Name = message.Name, Code = message.Code, IsActive = message.IsActive, BonusType = (BonusType)message.BonusType, BrandId = message.BrandId }); _repository.SaveChanges(); }
public void Consume(BonusCreated message) { _eventHandlers.Handle(message); }
public void Handle(BonusCreated @event) { AddActivityLog(AdminActivityLogCategory.Bonus, @event); }