Skip to content

Instantly share code, notes, and snippets.

@btompkins
Created December 14, 2012 02:09
Show Gist options
  • Save btompkins/4281961 to your computer and use it in GitHub Desktop.
Save btompkins/4281961 to your computer and use it in GitHub Desktop.
public IEnumerable<Order> GetApprovedOrders()
{
string address = "http://contoso.com/orders";
HttpClient client = new HttpClient(address);
WebQuery<Order> orders = client.CreateQuery<Contact>();
return orders.Where<Order>(o=>o.State == OrderState.Approved). OrderBy(o=o.OrderID);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment