c# IEnumerable Update object
I like the suggestions to let SQL do the foreign key cascading for you. Also, have you considered generating the id's outside the system (e.g. Guid.NewGuid()) and pushing them in?

Whatever the constraints and limitations you're working under, here's my take on a class hierarchy to handle your use case (via inheritance rather than encapsulation). 

While it might be a bit over-designed for just handling Id's, the idea here is to create an object model upon which you can expand the application to arbitrary size.  The example also aims to minimize code repetition.

using System;
using System.Collections.Generic;
using System.Diagnostics;

class App_DosageSchedule
{
    public void Run()
    {
        var regimens = new List&lt;Regimen&gt;();
        var schedule = new Schedule(regimens);
        schedule.PreserveIds();
        schedule.Save();
    }
}   

public abstract class Component
{
    public Guid Id { get; protected set; }
    public Guid OriginaId { get; protected set; }
    public void PreserveId()
    {
        OriginaId = Id;
        Debug.Write($"{GetType().Name} {Id}");
    }
}

public abstract class ComponentWithChildren : Component
{
    public void PreserveIds()
    {
        PreserveId();
        preserveChildIds();
    }

    protected abstract void preserveChildIds();
}

public class Schedule
{
    public List&lt;Regimen&gt; Regimens { get; private set; }
    public Schedule(List&lt;Regimen&gt; regimens) =&gt; Regimens = regimens;

    public void PreserveIds() =&gt; Regimens.ForEach(r =&gt; r.PreserveIds());

    public void Save()
    {
        ///write to SQL
    }
}

public class Regimen: ComponentWithChildren
{               
    public List&lt;RegimenPart&gt; Parts { get; private set; }
    protected override void preserveChildIds() =&gt; Parts.ForEach(p =&gt; p.PreserveIds());
}

public class RegimenPart : ComponentWithChildren
{       
    public List&lt;DosageInstruction&gt; Dosages{ get; private set; }
    protected override void preserveChildIds() =&gt; Dosages.ForEach(d =&gt; d.PreserveId());
}

public class DosageInstruction : Component
{       
}