This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi I need to fetch a collection of appointments where start >= startDate & end<= endDate & appointmentResourceIds == resourceIds It's the resourceIds I'm having trouble with. If we don't filter out the appointments that aren't in the selected resource group then our results will be huge. Can the lightspped engine construct sql queries using this type of Exists or In clause? I've looked through the doco and example projects but haven't found a solution. It could be that it's not possible, but I'm hopeful. If not then how could I accomplish this? |
|
|
If you're using query objects, the In operator can take a query or an array, e.g. object[] resourceIds = CopyResourceIdsToArray(); If you're using LINQ, you can use the Contains method, but you have to flip it around: uow.Appoinments.Where(a => objectIds.Contains(a.ApptResourceId)); Is this what you're looking for? |
|
|
Thanks, that's perfect! |
|