title: How to show the many side in a one-to-many relation as a table using Entity Framework scaffolding
body: <p>After choose a team I need to show the players in this team.</p>
  
  <p>I think the better way is to show a table of players in the create/edit/show team views.</p>
  
  <p>This is my model:</p>
  
  <pre><code>public class Player
  {
      [Key]
      public int PlayerId { get; set; }
      [Required]
      [Display(Name = "Name", AutoGenerateField = false)]
      public string name { get; set; }
      public int TeamId { get; set; }
      [Display(Name = "Team", AutoGenerateField = false)]
      public virtual Team Team { get; set; }
  }
  
  public class Team
  {
      [Key]
      public int TeamId { get; set; }
      [Required]
      [Display(Name = "Name", AutoGenerateField = false)]
      public string name { get; set; }
      [Display(Name = "Players")]
      public virtual ICollection&lt;Player&gt; Players { get; set; }
  }
  </code></pre>
  
  <p>But entity framework scaffold does not create a table inside teams views. It just create a combobox to choose the team in the player views.</p>
  
  <p>I searched on the internet but not found anything about that. How could I force scaffold to generate this table? Or it is necessary to create this table manually?</p>
  
  <p>I'm using Visual Studio 2015 and Entity Framework 6+ and C# in a asp.net mvc project.</p>
  
  <p>What I what to show is something like this:</p>
  
  <p>Team</p>
  
  <p>Name: Survivors</p>
  
  <p>Players</p>
  
  <pre><code> _________
  | Name  v 
   _________
  | Bill    
  | Louis   
  | Zoey    
  | Francis 
   _________
  </code></pre>