title: How to implement friendship structure with EFCore 6
body: <p>I know my question might be duplicated but I didn't find any answer that completely solves this question.
  I just want to implement a friendship structure with EFCore, I tried <code>Self Many-To-Many </code>relationship like this :</p>
  <pre><code>public class Person
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public int Age { get; set; }
      public string Email { get; set; }
  
      public ICollection&lt;Person&gt;? Friends { get; set; }
  }
  </code></pre>
  <p>but didn't work.
  I also tried to add another table just for storing friendships like this :</p>
  <pre><code>public class Person
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public int Age { get; set; }
      public string Email { get; set; }
  
      public ICollection&lt;PersonFriend&gt;? Friends { get; set; }
  }
  
  
  public class PersonFriend
  {
      public virtual Person Person { get; set; }
      public virtual Person Friend { get; set; }
  
      public int FriendId { get; set; }
      public int PersonId { get; set; }
  }
  </code></pre>
  <p>The problem with this is that I should insert 2 rows for each relationship and I think this is not standard at all, I think this method will decrease performance and break clean coding rules. Is there any other solution to implement this situation without inserting more than 1 row for each relationship?
  Thank you.</p>