I often see cqrs samples go
Do Something to in memory model .
Persist()
Fire Events; // in Event Sourcing some events do the persisting ,..
but doesn't this allow the domain to get out of wack with the database ? eg what if the model is updated and then the database transaction fails ?
Or do you work with singular roots and only allow another command to use that once the data is persisted ?
Regards,
Ben