You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Project
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public Guid? ParentId { get; set; }
public Project Parent { get; set; }
public ICollection<Project> Children { get; set; }
}
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: