Thanks for the example. I did my best to follow the project you uploaded. However, I am still not getting my appointments to show up under the resources. If I don't have the resources, the appointments show up fine. I'm going to throw out some code to see if you might be able to help more.
This is where I load my Provider data model which inherits Resource.
ProviderDataModel item = new ProviderDataModel();
item.ProviderID = (reader["ProviderID"] == DBNull.Value) ? 0 : Convert.ToInt32(reader["ProviderID"]);
item.ProviderFirstName = (reader["ProviderFirstName"] == DBNull.Value) ? string.Empty : reader["ProviderFirstName"].ToString();
item.ProviderLastName = (reader["ProviderLastName"] == DBNull.Value) ? string.Empty : reader["ProviderLastName"].ToString();
item.ProviderMiddleInitial = (reader["ProviderMiddleInitial"] == DBNull.Value) ? string.Empty : reader["ProviderMiddleInitial"].ToString();
item.ProviderTitle = (reader["ProviderTitle"] == DBNull.Value) ? string.Empty : reader["ProviderTitle"].ToString();
item.DisplayName = item.LastFirstName;
item.ResourceName = item.ProviderID.ToString();
item.ResourceType = "Providers";
yield return item;
Once it is loaded I then add them all into a ResourceType
ResourceType providerResourceType =
Once I have the ResourceTypes collection loaded I then load my appointments
appointment.Patient = Patients.Where(x => x.PatientID == appointment.Patient.PatientID).FirstOrDefault() ??
appointment.AppointmentType = AppointmentTypes.Where(x => x.AppointmentTypeID == appointment.AppointmentType.AppointmentTypeID).FirstOrDefault() ??
ProviderDataModel tempProvider = Providers.Where(x => x.ProviderID == appointment.AppointmentProviderScheduledID).FirstOrDefault();
I'm not at all sure what I'm doing wrong. When I go through and check the properties of your example ResourceType collection and mine I can find no fundamental difference. Thank you again for any help you can give.