public void Process(DataCollectorUpdated @event) { //TODO: Should be replaced with a new system var dataCollector = _dataCollectors.GetById(@event.DataCollectorId); dataCollector.FullName = @event.FullName; dataCollector.DisplayName = @event.DisplayName; dataCollector.Location = new Location(@event.LocationLatitude, @event.LocationLongitude); dataCollector.NationalSociety = @event.NationalSociety; dataCollector.PreferredLanguage = (Language)@event.PreferredLanguage; _dataCollectors.Save(dataCollector); }
public void Process(DataCollectorUpdated @event) { var dataCollector = _dataCollectors.GetById(@event.DataCollectorId); //TODO: Business Validator should check this(?) if (dataCollector == null) { return; } dataCollector.FullName = @event.FullName; dataCollector.DisplayName = @event.DisplayName; dataCollector.Location = new Location(@event.LocationLatitude, @event.LocationLongitude); dataCollector.NationalSociety = @event.NationalSociety; dataCollector.PreferredLanguage = (Language)@event.PreferredLanguage; _dataCollectors.Save(dataCollector); }