public enum SyncOutboxStatus { Pending, Submitted }

public static class SyncOutboxStatusExtensions
{
    public static string ToDbString(this SyncOutboxStatus s) => s switch
    {
        SyncOutboxStatus.Pending   => "PENDING",
        SyncOutboxStatus.Submitted => "SUBMITTED",
        _ => throw new ArgumentOutOfRangeException(nameof(s))
    };

    public static SyncOutboxStatus FromDbString(string v) => v switch
    {
        "PENDING"   => SyncOutboxStatus.Pending,
        "SUBMITTED" => SyncOutboxStatus.Submitted,
        _ => throw new ArgumentOutOfRangeException(nameof(v), $"Unknown sync outbox status: '{v}'")
    };
}
