편집

다음을 통해 공유


Web API Data operations Samples (C#)

This article provides information about the Web API samples implemented with C# using .NET 6.0. While each sample focuses on a different aspect of the Microsoft Dataverse Web API, they share similar characteristics and structure.

Prerequisites

To build and run the Dataverse Web API C# samples you need:

  • A version of Microsoft Visual Studio 2022 or later. A free version, Visual Studio Community, is available for download here.

  • Access to Dataverse with an account that has the System Administrator security role.

WebApiService class library

These samples use the WebAPIService class library (C#) to provide reusable common code that handles retriable service protection limit errors. More information: Service protection API limits

Web API samples listing (C#)

The following table lists the samples implemented in C#. Each sample is described in a more general manner in a corresponding sample group article that focuses on the HTTP request and response messages, as detailed in the article Web API Samples.

Sample Sample Group Description
Web API Basic Operations Sample (C#) Web API Basic Operations Sample Demonstrates how to create, retrieve, update, delete, associate and disassociate Dataverse entity records.
Web API Query Data sample (C#) Web API Query Data Sample Demonstrates how to use OData v4 query syntax and functions and Dataverse query functions. Includes examples of working with predefined queries and using FetchXML to perform queries.
Web API Conditional Operations sample (C#) Web API Conditional Operations Sample Demonstrates how to perform conditional operations you specify with ETag criteria.
Web API Functions and Actions Sample (C#) Web API Functions and Actions Sample Demonstrates how to use bound and unbound functions and actions, including custom actions.
Web API table schema operations sample (C#) Web API table schema operations sample Demonstrates how to perform selected operations that modify the Dataverse schema, or metadata.

The following samples demonstrate methods to add parallelism and concurrency to applications. These capabilities are an important part of maximizing throughput when performing operations that add or update data within Dataverse.

How to download and run the samples

The source code for each sample is available on GitHub at: PowerApps-Samples/dataverse/webapi/C#-NETx/. You can download the repository as a zip file that contains the solution files for the samples. For more information, see the How to run this sample section in each sample article.

See also

Use the Dataverse Web API
Web API Samples
Web API Samples (Client-side JavaScript)
WebAPIService class library (C#)