dotnet-sdk/examples/Client/ServiceInvocation
Aaron Crawfis eb568116e5
SDK Docs (#572)
* Setup dapr docs content

* Update SDK docs for new format

* Update daprdocs/content/en/dotnet-sdk-contributing/dotnet-contributing.md

Co-authored-by: Ryan Nowak <nowakra@gmail.com>

* Update daprdocs/content/en/dotnet-sdk-contributing/dotnet-contributing.md

Co-authored-by: Ryan Nowak <nowakra@gmail.com>

* Update python reference

* Update samples to examples

* Update layout

* Update prereqs

* Apply correct branding for .NET Core vs .NET

* Update examples/Client/StateManagement/README.md

* fix solution file

Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2021-02-16 22:15:33 -08:00
..
Example.cs SDK Docs (#572) 2021-02-16 22:15:33 -08:00
InvokeServiceGrpcExample.cs SDK Docs (#572) 2021-02-16 22:15:33 -08:00
InvokeServiceHttpClientExample.cs SDK Docs (#572) 2021-02-16 22:15:33 -08:00
InvokeServiceHttpExample.cs SDK Docs (#572) 2021-02-16 22:15:33 -08:00
Program.cs SDK Docs (#572) 2021-02-16 22:15:33 -08:00
README.md SDK Docs (#572) 2021-02-16 22:15:33 -08:00
ServiceInvocation.csproj SDK Docs (#572) 2021-02-16 22:15:33 -08:00

README.md

Dapr .NET SDK service invocation example

Prerequisites

Running the example

To run the sample locally run this command in the DaprClient directory:

dapr run --app-id DaprClient -- dotnet run <sample number>

Running the following command will output a list of the samples included:

dapr run --app-id DaprClient -- dotnet run

Press Ctrl+C to exit, and then run the command again and provide a sample number to run the samples.

For example run this command to run the 0th sample from the list produced earlier.

dapr run --app-id DaprClient -- dotnet run 0

HTTP client

Make sure to first run the Routing Service to have a service to invoke.

See InvokeServiceHttpClientExample.cs for an example of using HttpClient to invoke another service through Dapr.

Dapr HTTP client

Make sure to first run the Routing Service to have a service to invoke.

See InvokeServiceHttpExample.cs for an example using the DaprClient to invoke another service through Dapr.

Dapr gRPC client

Make sure to first run the GrpcService to have a service to invoke.

See InvokeServiceGrpcExample.cs for an example using the DaprClient to invoke a service using gRPC through Dapr.