Exemplo n.º 1
0
 private bool IsCircularDependencyRecurisve(Table rootTable, ForeignKey fk)
 {
     if (visitedFK.Contains(fk))
     {
         return false;
     }
     visitedFK.Add(fk);
     if (fk.Referenced == rootTable)
     {
         return true;
     }
     return fk.Referenced.ForeignKeys.Any(_fk => IsCircularDependencyRecurisve(rootTable, _fk));
 }
Exemplo n.º 2
0
 private bool IsCircularDependency(Table rootTable, ForeignKey fk)
 {
     visitedFK.Clear();
     return IsCircularDependencyRecurisve(rootTable, fk);
 }