https://github.com/j0rgeserran0/netcoreconf_2021
Demos of the talk I did in the Virtual NetCoreConf 2021 in Spain
https://github.com/j0rgeserran0/netcoreconf_2021
2021 bidirectional-streaming-rpc client-streaming-rpc csharp grpc net5 netcore3 netcoreconf protobuf server-streaming-rpc talk unary-rpc
Last synced: 3 months ago
JSON representation
Demos of the talk I did in the Virtual NetCoreConf 2021 in Spain
- Host: GitHub
- URL: https://github.com/j0rgeserran0/netcoreconf_2021
- Owner: J0rgeSerran0
- Created: 2021-02-22T12:16:07.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-28T14:48:35.000Z (over 5 years ago)
- Last Synced: 2025-03-24T06:38:59.794Z (over 1 year ago)
- Topics: 2021, bidirectional-streaming-rpc, client-streaming-rpc, csharp, grpc, net5, netcore3, netcoreconf, protobuf, server-streaming-rpc, talk, unary-rpc
- Language: C#
- Homepage:
- Size: 2.73 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

> Demos of the talk I did in the Virtual **[NetCoreConf 2021](https://netcoreconf.com/)** in Spain (26th - 27th of February)
# **gRPC - Introducción a desarrolladores ASP.NET Core**
## **Presentation (pdf in Spanish)**
[NetCoreConf 2021 - Presentation](presentation.pdf)
## **Samples**
### **[GrpcHelloWorld](src/GrpcHelloWorld)**
> Typical gRPC *Hello World* sample that is shown in the talk (using **Unary**)
```
Client => .NET Core 3.1
Server => .NET 5
```
[protobuf file](src/GrpcHelloWorld/GrpcHelloWorldService/Protos/greet.proto)
**Startup.cs**
Important parts in the sample:
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// MORE CODE HERE
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService();
// MORE CODE HERE
});
}
```
### **[GrpcDemo](src/GrpcDemo)**
> gRPC sample that is shown in the talk (using **Unary, Server Streaming, Client Streaming, Bidirectional Streaming**)
```
Client => .NET 5
Server => .NET 5
```
[protobuf file](src/GrpcDemo/GrpcDemoService/Protos/store.proto)
**Startup.cs**
Important parts in the sample:
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddGrpc();
services.AddSingleton();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// MORE CODE HERE
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapGrpcService();
// MORE CODE HERE
});
}
```