“Horking

 

HORK Sample: Finding data with HORK, continued

Sometimes you just need to HORK out a query and don't want those entity loaders classes getting in the way. For the industrial-strength user we have the venerable HORKQuery:

HORKQuery query = new HORKQuery();
query.AddWhereEnd(new Where("ItemNumber", Where.Comparators.EQUALS, "730267"));
OrderItemLoader orderLoader = new OrderItemLoader();
OrderItem[] orderItems = orderLoader.Select(query);
if (orderItems != null && orderItems.Length > 0)
{
    Console.WriteLine("Order(s) were selected!");
}
else
{
    Console.WriteLine("Order Select failed.");
}