How to set cascade to all-delete-orphans with mapping by code in NHibernate?
[Flags]
public enum Cascade
{
    None = 0,
    Persist = 2,
    Refresh = 4,
    Merge = 8,
    Remove = 16,
    Detach = 32,
    ReAttach = 64,
    DeleteOrphans = 128,
    All = 256,
}
How can I combine All & DeleteOrphans?
Try to use:
r.Cascade(Cascade.All | Cascade.DeleteOrphans);
Because the Cascade is a [Flag] ... multi could be used:
What does the [Flags] Enum Attribute mean in C#?If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With