Please note, your code wouldn't compile (you need to give a name to your
ICollection
or
List
property).
In the first case, e.g.
public class Customer
{
public int Id { get; set; }
public int Name{ get; set; }
public ICollection<Product> ProdColl{ get ; set ;}
}
You may use
any of the classes implementing the
ICollection<T>
interface to set (and then get) the
ProdColl
property, e.g.
LinkedList<ProductList> = new LinkedList<Porduct>();
Customer Cust = new Cuustomer();
Cust.ProdColl = ProductList;
While, in the second case, you have to use exctly a
List<Product>
.