private void Apply(TripUpdated @event) { Id = @event.AggregateRootId; _end = @event.Ended; _start = @event.Started; _status = @event.Status; _currentLocation = @event.CurrentLocation; }
Trip IEntityBuilder <Trip, TripUpdated> .Apply(Trip entity, TripUpdated @event) { if (@event.Destination != null) { entity.Destination = @event.Destination; } if (@event.IsCancelled.HasValue) { entity.IsCancelled = @event.IsCancelled.Value; } if (@event.Owner != null) { entity.Owner = @event.Owner; } entity.SequenceNumber = @event.SequenceNumber; return(entity); }