Skip to content

Lesson 3: Pulling It All Together in a Query

Donald Roy Airey edited this page Feb 6, 2019 · 13 revisions

We're going to build on our example in Lesson 2 and construct a query from the tables we've created and the data we've imported. If you haven't already, follow the steps in Lesson 2.

Step 1

You may have noticed a notation on the tables in our schema.

<xs:element name="Product" gfdata:verbs="Delete,Get,Post,Put">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="Mnemonic" type="xs:string"/>
      <xs:element name="Name" type="xs:string"/>
      <xs:element name="Price" type="xs:double" />
      <xs:element name="ProductId" gfdata:AutoIncrement="true" type="xs:int" />
    </xs:sequence>
  </xs:complexType>
</xs:element>

The verbs attribute is an instruction telling the generator what RESTful verbs to support on the controller. The generated handler for the Get verb will simply give us a snapshot of the table. For this lesson, we're going to create a more useful view.

Clone this wiki locally