Exemple #1
0
        public async Task Handle(Declaration_ChangeDescriptionCommand command)
        {
            Declaration_ChangeDescriptionEvent declaration_ChangeDescriptionEvent = new Declaration_ChangeDescriptionEvent()
            {
                Id = command.Id, NewDescription = command.NewDescription, OldDescription = command.OldDescription
            };
            await eventRepository.Set(declaration_ChangeDescriptionEvent);

            var obj = await repository.Get(command.Id);

            obj.Description = command.NewDescription;
            await repository.SaveChanges();
        }
Exemple #2
0
 public void On(Declaration_ChangeDescriptionEvent newDescription)
 {
     Description = newDescription.NewDescription;
 }