Owneat Technical Guide main Help

Class GetAllProductsQueryHandler

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

public sealed class GetAllProductsQueryHandler : IRequestHandler<GetAllProductsQuery, Result<IEnumerable<Product>>>

Inheritance

object ← GetAllProductsQueryHandler

Implements

IRequestHandler<GetAllProductsQuery, Result<IEnumerable<Product\>\>\>

Inherited Members

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

Constructors

GetAllProductsQueryHandler\(IProductRepository\)

public GetAllProductsQueryHandler(IProductRepository productRepository)

Parameters

productRepository IProductRepository

Methods

Handle\(GetAllProductsQuery, CancellationToken\)

Handles a request

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

Parameters

request GetAllProductsQuery

The request

cancellationToken CancellationToken

Cancellation token

Returns

Task <Result< IEnumerable <Product\>\>\>

Response from the request

Last modified: 21 May 2024