From the course: Learning ASP.NET Core: MVC, Razor Pages, Web APIs & Other Foundations

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Implementing service methods

Implementing service methods

- [Instructor] I'm now ready to create concrete classes that inherit from the abstract base classes generated for my GRPC services. I've already got the GreeterService.cs file open. It was created for me by the GRPC project template. The default greet.proto file declared a method on the service named SayHello. The code generation tooling created a virtual method with that name in the abstract base class. It's up to me as the developer to override that virtual method in my concrete service class. The method here is to code provided by the project template. Remember that I added a second method to the greet.proto file named GreetNewEmployee. A virtual version of that method was added to the abstract base class when I rebuilt the project. I now need to override it here with my desired functionality. I want similar functionality to the SayHello method above, so I'll copy the body of it and paste it into this new method. I'll just update the message to say Welcome to the company. That's…

Contents