Ok...as I continue to muddle my way through teaching myself... Here is my latest question. Ha! I have a WPF App using MVVM and three different sample MySQL tables as follows:
BOOKINGS
Booking_ID_Num | Book_Type_Num | Fac_ID_Num |
---------------|---------------|------------|
1 | 1 | 2 |
2 | 2 | 3 |
3 | 1 | 1 |
BOOKING_TYPES
Book_Type_Num | Book_Type |
--------------|------------|
1 | Full Time |
2 | Singe Case |
FACILITIES
Fac_ID_Num | Facility_Name |
-----------|---------------|
1 | Joe's Shop |
2 | MedRX |
3 | Grocery Story |
I'm going to try to explain this as succinctly as possible, feel free to criticize... I would like to fill an ObservableCollection and pass that ObservableCollection to a DataGrid. I know how to fill an ObservableCollection through a Model Class, but I don't know how to fill with multiple tables. In this example, I would like to have an Observable Collection in the ViewModel passed to a DataGrid that is structured like this:
Booking_ID_Num | Book_Type_Num | Book_Type | Fac_ID_Num | Facility_Name |
---------------|---------------|-------------|------------|---------------|
1 | 1 | Full Time | 2 | MedRx |
2 | 2 | Single Case | 3 | Grocery Store |
3 | 1 | Full Time | 1 | Joe's Shop |
Basically, I want to use the Book_Type and Facility_Name in the final solution without having to make any adjustments in the MySQL database like creating a new "view" or something. Does that make sense? This site has been wonderful in helping me learn. Any help on this vague question would be greatly appreciated. Thank you so much!