title: What's the difference between List<xx> and HashSet<xx> in a class constructor with EF6?
body: <p>I am using Entity Framework 6 and defining a table called ObjectiveDetail. </p>
  
  <p>I've seen two ways to create the ObjectiveDetail class. One that creates
  a List and the other HashSet. </p>
  
  <p>What's the difference?</p>
  
  <pre><code>public partial class ObjectiveDetail {
      public ObjectiveDetail() {
          this.SubTopics = new List&lt;SubTopic&gt;();
      }
      public int ObjectiveDetailId { get; set; }
      public int Number { get; set; }
      public string Text { get; set; }
      public virtual ICollection&lt;SubTopic&gt; SubTopics { get; set; }
  }
  
  public class ObjectiveDetail 
  {
      public ObjectiveDetail() {
          this.SubTopics = new HashSet&lt;SubTopic&gt;();
      }
      public int ObjectiveDetailId { get; set; }
      public int Number { get; set; }
      public string Text { get; set; }
      public virtual ICollection&lt;SubTopic&gt; SubTopics { get; set; }
  }
  </code></pre>