Skip to content

Instantly share code, notes, and snippets.

@Tazer
Created March 30, 2012 08:04
Show Gist options
  • Save Tazer/2249205 to your computer and use it in GitHub Desktop.
Save Tazer/2249205 to your computer and use it in GitHub Desktop.
var gatewaysByDestinationAndShipQuery = session.Query<Available_Gateway, Available_Gateways>();
foreach (var destination in destinations)
{
gatewaysByDestinationAndShipQuery = gatewaysByDestinationAndShipQuery.Where(x => x.PortCodes.Any(y => destination == y));
}
foreach (var ship in ships)
{
gatewaysByDestinationAndShipQuery = gatewaysByDestinationAndShipQuery.Where(x => x.ShipCodes.Any(y => ship == y));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment