you have two options:
- throw away MRN that get rolled back. This is how sqlserver handles identity column on rollback. the number is never reused.
- assign the MRN as the last step of the saga.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In a hospital management system built with micro services using .NET Core and Entity Framework, how can we ensure data consistency when generating Medical Record Numbers (MRNs)? Since MRNs cannot be deleted, how can we handle situations where a downstream service failure occurs after MRN generation using the Saga pattern with compensating transactions?
you have two options: