self refrence still can not work
public class Area
{
[BsonId]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public ObjectId Id { get; private set; }
public string Name { get; set; }
public string Code { get; set; }
public virtual Area Parent { get; set; }
public virtual ICollection<Area> Areas { get; set; }
}
my class is area ,has child ICollection<Area> Areas,which is self refrence, save can success,but can not read,use include still not work
I am currently working on this issue. It appears to be a problem with ForeignKey.IsSelfPrimaryReferencingKey() returning true, causing certain checks that try to map between ForeignKey.PrincipalToDependent and ForeignKey.DependentToPrincipal to incorrectly switch contexts. There seems to be a related piece of EF Core that I have yet to override that will fix it completely.