Пример #1
0
    public void Handle(CreatePersonCommand command)
    {
        Person entity = Person.Create(command.Id, command.FirstName, command.LastName);

        _commandRepository.Add(entity);
    }
Пример #2
0
        public void Handle(CreateNewPersonCommand command)
        {
            var person = Person.Create(BusinessId.FromGuid(command.Id), command.FirstName, command.LastName);

            personCommandRepository.Add(person);
        }