You could do this with sagas, yes, although you probably shouldn't. First of, having the same event for both creation and updating the person loses semantic information in the event (which is what you are trying to recreate by checking for the user in the database). You also expose yourself to a lot of potential race conditions, and need to think about how to handle them all. My suggestion would be to rework your message flow, that will probably make your current problem go away.
But, if you want to try it anyway, you'd do something like this: (not tested or compiled, just conceptual code)
public class MySaga : Saga<MySagaDataType>, IAmStartedByMessage<PersonChanged>, IAmStartedByMessage<PersonAddressChanged> {
public override void ConfigureHowToFindSaga() {
// How to correlate PersonChanged and PersonAddressChanged messages
}
public void Handle<PersonChanged>(PersonChanged msg) {
Insert(msg);
if(Data.PendingAddressChange != null)
UpdateDatabase(msg);
MarkAsComplete();
}
public void Handle<PersonAddressChanged>(PersonAddressChanged msg) {
if(IsInDatabase(msg.Person)) {
UpdateDatabase(msg);
MarkAsComplete();
}
else {
Data.PendingAddressChange = msg;
}
}
}
public class MySagaDataType : IContainSagaData {
public PersonAddressChanged PendingAddressChange { get; set; }
}