Sdílet prostřednictvím


Quickstart (WCF Data Services)

Important

WCF Data Services has been deprecated and will no longer be available for download from the Microsoft Download Center. WCF Data Services supported earlier versions of the Microsoft OData (V1-V3) protocol only and has not been under active development. OData V1-V3 has been superseded by OData V4, which is an industry standard published by OASIS and ratified by ISO. OData V4 is supported through the OData V4 compliant core libraries available at Microsoft.OData.Core. Support documentation is available at OData.Net, and the OData V4 service libraries are available at Microsoft.AspNetCore.OData.

RESTier is the successor to WCF Data Services. RESTier helps you bootstrap a standardized, queryable, HTTP-based REST interface in minutes. Like WCF Data Services before it, Restier provides simple and straightforward ways to shape queries and intercept submissions before and after they hit the database. And like Web API + OData, you still have the flexibility to add your own custom queries and actions with techniques you're already familiar with.

This quickstart helps you become familiar with WCF Data Services and the Open Data Protocol (OData) through a series of tasks that support the topics in Getting Started.

What you'll learn

The first task in this quickstart shows how to create a data service to expose an OData feed from the Northwind sample database. In later topics, you will access the OData feed by using a Web browser, and also create a Windows Presentation Foundation (WPF) client application that consumes the OData feed by using client libraries.

Prerequisites

To complete this quickstart, install the following components:

  • Visual Studio

  • An instance of SQL Server. This includes SQL Server Express, which is included in a default installation of Visual Studio 2015, or as part of the Data storage and processing workload in Visual Studio 2017 or later.

  • The Northwind sample database. To install the database, run the Transact-SQL script from Northwind and pubs sample databases for Microsoft SQL Server.

WCF data services quickstart tasks

Create the Data Service

Define the ASP.NET application, define the data model, create the data service, and enable access to resources.

Access the Service from a Web Browser

Start the service from Visual Studio and access the service by submitting HTTP GET requests through a Web browser to the exposed feed.

Create the .NET Framework Client Application

Create a WPF app to consume the OData feed, bind data to Windows controls, change data in the bound controls, and then send the changes back to the data service.

Note

Project files from a completed version of the quickstart can be downloaded from GitHub.

Next steps

See also