title: Change columns names on an autogenerated N:M table using EF Code First
body: <p>I'm developing a Class library using C# using the latest version of Entity Framework and VS2010. I have this class:</p>
  
  <pre><code>public class User
  {
      public int UserId { get; set; }
      public String Name { get; set; }
      public int Age { get; set; }
      public String City { get; set; }
      public String Country { get; set; }
      public String Email { get; set; }
      public String InterestIn { get; set; }
  
      public List&lt;User&gt; Friends { get; set; }
      public List&lt;User&gt; FromWhomIsFriend { get; set; }
      public List&lt;Activity&gt; WantsToDo { get; set; }
      public List&lt;Message&gt; MessagesSent { get; set; }
      public List&lt;Message&gt; MessagesReceived { get; set; }
  }
  </code></pre>
  
  <p>EF has generated these two tables on SQLEXPRESS:</p>
  
  <p><img src="https://i.stack.imgur.com/tM29C.png" alt="enter image description here"></p>
  
  <p>I have three questions:</p>
  
  <ol>
  <li>How can I rename the table <code>dbo.UserUsers</code> to <code>dbo.UserFriends</code>?</li>
  <li>How can I rename its two columns to <code>UserId</code> and <code>FriendId</code>?</li>
  <li>How can I set columns <code>UserId</code> and <code>FriendId</code> as PK for <code>dbo.UserFriends</code> table?</li>
  </ol>
  
  <p><strong>NOTE:</strong> This is my first time working with EF Code First.</p>