Owneat Technical Guide main Help

Class RestaurantGrpcService

Namespace: Restaurant.API.Grpc
Assembly: Restaurant.API.dll

Service that acts as a controller for GRPC restaurant server-sided requests.

public class RestaurantGrpcService : RestaurantService.RestaurantServiceBase

Inheritance

object ← RestaurantService.RestaurantServiceBase ← RestaurantGrpcService

Inherited Members

RestaurantService.RestaurantServiceBase.DecrementProductsStock\(GrpcDecrementProductStockCommand, ServerCallContext\), object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.MemberwiseClone\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Constructors

RestaurantGrpcService\(IMediator\)

Service that acts as a controller for GRPC restaurant server-sided requests.

public RestaurantGrpcService(IMediator mediator)

Parameters

mediator IMediator

Methods

DecrementProductsStock\(GrpcDecrementProductStockCommand, ServerCallContext\)

Grpc call that decrement product stock before placing an Order.

public override Task<GrpcDecrementProductStockResponse> DecrementProductsStock(GrpcDecrementProductStockCommand request, ServerCallContext context)

Parameters

request GrpcDecrementProductStockCommand

Command received via GRPC that contains products ids and the quantity to decrement.

context ServerCallContext

The GRPC server call context.

Returns

Task <GrpcDecrementProductStockResponse\>

Restaurant.Application.Responses.Product.DecrementProductStockResponse that will be used on client side to place the order.

Last modified: 21 May 2024