Owneat Technical Guide main Help

Class GetProductByIdQueryHandler

Namespace: Restaurant.Application.Requests.Product
Assembly: Restaurant.Application.dll

public sealed class GetProductByIdQueryHandler : IRequestHandler<GetProductByIdQuery, Result<Product>>

Inheritance

object ← GetProductByIdQueryHandler

Implements

IRequestHandler<GetProductByIdQuery, Result<Product\>\>

Inherited Members

object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Constructors

GetProductByIdQueryHandler\(IProductRepository\)

public GetProductByIdQueryHandler(IProductRepository productRepository)

Parameters

productRepository IProductRepository

Methods

Handle\(GetProductByIdQuery, CancellationToken\)

Handles a request

public Task<Result<Product>> Handle(GetProductByIdQuery request, CancellationToken cancellationToken)

Parameters

request GetProductByIdQuery

The request

cancellationToken CancellationToken

Cancellation token

Returns

Task <Result<Product\>\>

Response from the request

Last modified: 21 May 2024