Currently I'm trying to combine two database tabels with a join

After that I looping through the reader and create an Appointment Object foreach row that returned from the query. That Appointment object is added to a list.
The problem is when I start my program. The user data is not binded to the Customer object. Customer is still null here, but the customer data is added with the join.
How can I fix this issue? So that the Customer data that comes from the join is added to that Customer Model object.


appointments.Add(new Appointment { ... Customer = new Customer( CustomerId = int.Parse( reader["CustomerId"]))?usingblocks for your connection, command and reader objects