public void Process(DataCollectorAdded @event) { var dataCollector = _dataCollectors.GetById(@event.Id) ?? new DataCollector(@event.Id); dataCollector.FirstName = @event.FirstName; dataCollector.LastName = @event.LastName; dataCollector.Location = new Location(@event.LocationLatitude, @event.LocationLongitude); _dataCollectors.Save(dataCollector); }
public async Task Process(DataCollectorAdded @event) { var dataCollector = _dataCollectors.GetById(@event.Id) ?? new DataCollector(@event.Id); dataCollector.FullName = @event.FullName; dataCollector.DisplayName = @event.DisplayName; dataCollector.Location = new Location(@event.LocationLatitude, @event.LocationLongitude); await _dataCollectors.Save(dataCollector); }
public DataCollector(DataCollectorAdded @event) { Id = @event.Id; FirstName = @event.FirstName; LastName = @event.LastName; Age = @event.Age; Sex = @event.Sex; NationalSociety = @event.NationalSociety; PreferredLanguage = @event.PreferredLanguage; GpsLocation = @event.GpsLocation; MobilePhoneNumber = @event.MobilePhoneNumber; Email = @event.Email; }
public void Process(DataCollectorAdded @event) { var dataCollector = _dataCollectors.GetById(@event.Id) ?? new DataCollector(@event.Id); dataCollector.FullName = @event.FullName; dataCollector.DisplayName = @event.DisplayName; dataCollector.Location = new Location(@event.LocationLatitude, @event.LocationLongitude); dataCollector.YearOfBirth = @event.YearOfBirth; dataCollector.NationalSociety = @event.NationalSociety; dataCollector.PreferredLanguage = (Language)@event.PreferredLanguage; dataCollector.Sex = (Sex)@event.Sex; dataCollector.RegisteredAt = @event.RegisteredAt; _dataCollectors.Save(dataCollector); }
public void Process(DataCollectorAdded @event) { var dataCollector = _dataCollectors.GetById(@event.Id) ?? new DataCollector(@event.Id); dataCollector.FirstName = @event.FirstName; dataCollector.LastName = @event.LastName; dataCollector.Location = new Location(@event.LocationLatitude, @event.LocationLongitude); dataCollector.Age = @event.Age; dataCollector.NationalSociety = @event.NationalSociety; dataCollector.PreferredLanguage = @event.PreferredLanguage; dataCollector.Sex = @event.Sex; dataCollector.RegisteredAt = @event.RegisteredAt; _dataCollectors.Save(dataCollector); }
public void Process(DataCollectorAdded @event) { var user = new DataCollector(@event); _users.Save(user); }