I find an answer
Entity Framework Core: many-to-many relationship with same entity and try like this.
Entitys:
It's not mandatory the second collection. You only need to left de .WithMany() empty like this:
modelBuilder.Entity()
.HasOne(f => f.MainUser)
.WithMany()
.HasForeignKey(f => f.MainUserId);
modelBuilder.Entity()
.HasOne(f => f.FriendUser)
.WithMany()
.HasForeignKey(f => f.FriendUserId);
look at this : https://github.com/aspnet/EntityFramework/issues/6052