OData is an open data protocol to allow the creation and consumption of queryable and interoperable REST APIs so we can interact with a data source through the Internet using simple HTTP requests, almost as if it were a local database. We will use the OData type provider to first explore the OData data from a particular source.
We will set up our F# script file by referencing the proper OData and type provider assemblies:
- Create an F# script file,
ODataTypeProviderSample.fsx
. - Add related references to the script file:
#r "FSharp.Data.TypeProviders" #r "System.Data.Services.Client.dll" open System open System.Linq open System.Data open Microsoft.FSharp.Data.TypeProviders
For this sample, we will not create or host an OData service itself, but we will use an existing Northwind
OData service that is available at the following URL: