How to add List<B> to Object A, where List<B> is part of class A
问题 I have two classes of Customer and Products like below. I am getting data from DataBase and reading it into SqlDataReader. From that I have to read it to Customer Object. we will have multiple Products for each Customer. Here I have to add Product object to Customer Object(we may have multiple products for each customer. Any suggestions please.. what is the best way to do this? public class Customer { public int CustomerId {get;set;} public string Name {get;set;} public List<Products>