Defining the SQL table binding

There are two different ways in which we can use to access SQL table records using the ApiHub.SDK library:

  1. Defining the binding using a POCO object

Using a Plain old CLR object (POCO) object lets you explicitly define a class that has all, or a subset of properties defined in the SQL table.

  1. Defining the binding using JObject

Using JObject (defined in the Newtonsoft.Json.Linq NuGet library) lets you define the entity as a JSON object. With JSON object, you can add properties during runtime, which allows for more flexibility with the object type.

In the previous example, we used a POCO object to define the entities of the DocumentTextScore SQL table in ApiHub.SDK binding.

When accessing the AverageDocumentScore ...

Get Serverless computing in Azure with .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.