quickstarts/state_management/csharp/http
Paul Yuknewicz 1b8a451a40
Merge branch 'release-1.13' into kaibocai/add-js-quickstart
Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>
2024-02-27 10:14:16 -08:00
..
order-processor Converted all projects to net8.0 2024-02-18 16:12:57 +13:00
README.md Revert "Fix tests broken by timing change" 2024-02-10 12:04:49 -08:00
dapr.yaml Merging `release-1.12` into main branch (#952) 2023-10-13 16:10:27 -07:00
makefile Removed docker image prefix addition step 2022-07-25 12:28:57 -07:00

README.md

Dapr state management (HTTP Client)

In this quickstart, you'll create a microservice to demonstrate Dapr's state management API. The service generates messages to store in a state store. See Why state management to understand when to use this API.

Visit this link for more information about Dapr and State Management.

Note: This example leverages HTTP requests only. If you are looking for the example using the Dapr Client SDK (recommended) click here.

This quickstart includes one service:

  • Dotnet client service order-processor

Run all apps with multi-app run template file

This section shows how to run applications at once using multi-app run template files with dapr run -f .. This enables to you test the interactions between multiple applications.

  1. Open a new terminal window and run order-processor using the multi app run template defined in dapr.yaml:
cd ./order-processor
dotnet restore
dotnet build
cd ..
  1. Run the Dotnet service app with Dapr:
    dapr run -f .
  dapr stop -f .

Run a single app at a time with Dapr (Optional)

An alternative to running all or multiple applications at once is to run single apps one-at-a-time using multiple dapr run .. -- dotnet run commands. This next section covers how to do this.

  1. Run the Dotnet service app with Dapr:
cd ./order-processor
dapr run --app-id order-processor --resources-path ../../../resources/ -- dotnet run
  1. Stop and clean up application processes

dapr stop --app-id order-processor