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 ); }
public bool DataCollectorCanChangeDisplayName(ChangeBaseInformation command) => _dataCollectors.Query.SingleOrDefault(d => d.DisplayName == command.DisplayName && d.Id != command.DataCollectorId) == null;