* Remove .NET Core 3.1 support and standardize on .NET 6 Signed-off-by: Yash Nisar <yashnisar@microsoft.com> * Remove support for .NET 5 as well Signed-off-by: Yash Nisar <yashnisar@microsoft.com> --------- Signed-off-by: Yash Nisar <yashnisar@microsoft.com> |
||
---|---|---|
.. | ||
Example.cs | ||
InvokeServiceGrpcExample.cs | ||
InvokeServiceHttpClientExample.cs | ||
InvokeServiceHttpExample.cs | ||
Program.cs | ||
README.md | ||
ServiceInvocation.csproj |
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.