Open mpartipilo opened 6 years ago
I may have found the problem: Namespace is compared to other.Name.
public bool Equals(ClrType other)
{
return other is ClrType
&& Name == other.Name
&& Namespace == other.Name
&& Assembly == other.Assembly
&& GenericTypeArguments.Count() == other.GenericTypeArguments.Count()
&& GenericTypeArguments.All(e => other.GenericTypeArguments.Any(ee => e.Equals(ee)));
}
public bool Equals(Type other)
{
return other is Type
&& Name == other.Name
&& Namespace == other.Name
&& Assembly == other.AssemblyQualifiedName
&& GenericTypeArguments.Count() == other.GenericTypeArguments.Length
&& GenericTypeArguments.All(e => other.GenericTypeArguments.Any(ee => e.Equals(ee)));
}
Now, next challenge: Newtonsoft.Json.JsonSerializationException: 'Self referencing loop detected for property 'principalEntity' with type 'EntityFrameworkCore.Diagrams.Dto.DbEntity'. Path 'entities[0].foreignKeys[0]'.'
I think I will just refactor my entities to get rid of the self reference via an external entity. I might do a PR for the .Equals fix, but feel free to do it yourself if I don't make it in time.
An entity like this will cause a StackOverflow.