A stub is generated code that supplies a callable interface for communicating with a remote service. An interface description generates server base classes and client-side code, so application code can implement or call the declared operations instead of building the communication layer manually. section 10.3.4 section 10.4.3
A typical generated-stub workflow is:
- Describe messages and service operations in a protocol buffer or other interface definition file. section 10.3.4 section 10.4.3
- Configure the project so its compiler or IDL tool generates the required source code. section 10.3.4 section 10.4.3
- Extend the generated server base class, connect it to application data, and register the service in the HTTP pipeline. section 10.3.4
Board-game lookup service
A grpc.proto definition declares GetBoardGame, accepting BoardGameRequest and returning BoardGameResponse. Generated code supplies the GrpcBase class; GrpcService extends it, queries EF Core for the requested board game, and returns the generated response type. The application enables gRPC with AddGrpc and MapGrpcService<GrpcService>(). section 10.3.4









