I want to create a gRPC service but I need to host in a winform .net application. there is an extraordinary example of how Hosting ASP.NET Core API in a Windows Forms Application I would like someone to explain to me, what I need to install and what I should change in that example, to host a grpc service in the form of Windows ...
You could follow the same steps but with several additional:
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService<MygRPCService>();
});
rpc Get(GetRequest) returns (GetReply) {
option (google.api.http) = {
get: '/my-endpoint'
body: '*'
};
}
services.AddGrpc();
services.AddGrpcHttpApi();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With