Visual Studio 2008 WCF client with REST data service

The eXtreme Scale REST data service getting started sample includes a WCF Data Services client that can interact with the eXtreme Scale REST data service. The sample is written as a command-line application in C#.

Software requirements

The WCF Data Services C# sample client requires the following:

Building and running the getting started client

The WCF Data Services sample client includes a Visual Studio 2008 project and solution and the source code for running the sample. The sample must be loaded into Visual Studio 2008 and compiled into a Windows runnable program before it can be run. To build and run the sample, see the text document: restservice_home/gettingstarted/VS2008_README.txt.

WCF Data Services C# client command syntax

[Windows]WXSRESTGettingStarted.exe <service URL> <command>

The <service URL> is the URL of the eXtreme Scale REST data service configured in section .

The following commands are available:
  • load default

    Loads a predefined set of Customer, Category and Product entities into the data grid and creates a random set of Orders for each customer.

  • load category <categoryId> <categoryName> <firstProductId> <numProducts>

    Creates a product Category and a fixed number of Product entities in the data grid. The firstProductId parameter identifies the id number of the first product and each subsequent product is assigned the next id until the specified number of products is created.

  • load customer <companyCode> <contactName> <companyName> <numOrders> <firstOrderId> <shipCity> <maxItems> <discountPct>

    Loads a new Customer into the data grid and creates a fixed set of Order entities for any random product currently loaded in the data grid. The number of Orders is determined by setting the <numOrders> parameter. Each Order will have a random number of OrderDetail entities up to <maxItems>

  • display customer <companyCode>

    Display a Customer entity and the associated Order and OrderDetail entities.

  • display category <categoryId>

    Display a product Category entity and the associated Product entities.

  • unload

    Remove all entities that were loaded using the "default load" command.

The following examples illustrate various commands.
  • WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid load default
  • WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid load customer
  • IBM "John Doe" "IBM Corporation" 5 5000 Rochester 5 0.05
  • WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid load category 5 "Household Items" 100 5
  • WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid display customer IBM
  • WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid display category 5