I have an object that contains a list of child objects. This is a very simple Order -> OrderLines type of relationship.
Now I'm trying to map out my class and have set up the object as an ICollection:
public virtual ICollection<OrderLines> OrderLinesCollection { get; set; }
However when I assign values to the collection, I am unsure on whether to use a HashSet or a List to hold my collection of OrderLines.
this.OrderLinesCollection = new HashSet<OrderLines>();
this.OrderLinesCollection = new List<OrderLines>();
What is the best way of doing this?