public void Handle(ChangeBaseInformation command)
        {
            var root = _repository.Get(command.DataCollectorId.Value);

            root.ChangeBaseInformation(
                command.FullName,
                command.DisplayName,
                command.YearOfBirth,
                command.Sex,
                command.Region,
                command.District
                );
        }
Esempio n. 2
0
 public bool DataCollectorCanChangeDisplayName(ChangeBaseInformation command) =>
 _dataCollectors.Query.SingleOrDefault(d => d.DisplayName == command.DisplayName && d.Id != command.DataCollectorId) == null;