This question is locked. New answers and comments are not allowed.
I'm having a problem trying to get OpenAccess / LINQ to do an IN or CONTAINS on a field of a subtype collection. This is for my radscheduler.
I have two classes ScheduledAppointment and UserGroup the two are joined as a m:n collection (scheduledappointment being the owner). I have a string array of groupID's and I need to get the record for any group that has a groupID contained in the arraylist.
obviously I cannot use the index of AppointmentGroupsCollection[0] so I'm unsure of how to accomplish this. I tried doing a sub-where with a predicate but It didn't like that either.
s
Help !?
I have two classes ScheduledAppointment and UserGroup the two are joined as a m:n collection (scheduledappointment being the owner). I have a string array of groupID's and I need to get the record for any group that has a groupID contained in the arraylist.
obviously I cannot use the index of AppointmentGroupsCollection[0] so I'm unsure of how to accomplish this. I tried doing a sub-where with a predicate but It didn't like that either.
s
//----Add All The Group Appointments To the Calendar------------------- |
var GroupAppointmentsToShow = |
from GroupAppointments in Scope.Extent<mynamespace.Entity.ScheduledAppointment>() |
where |
GroupAppointments.Start >= owner.VisibleRangeStart && |
GroupAppointments.End1 <= owner.VisibleRangeEnd && |
GroupStringArrayOfGroupIDs.Contains(GroupAppointments.AppointmentGroupsCollection[0].UserGroupID) |
select GroupAppointments; |
Help !?