Owneat Technical Guide main Help

Class GetIngredientByIdQueryHandler

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

public sealed class GetIngredientByIdQueryHandler : IRequestHandler<GetIngredientByIdQuery, Result<Ingredient>>

Inheritance

object ← GetIngredientByIdQueryHandler

Implements

IRequestHandler<GetIngredientByIdQuery, Result<Ingredient\>\>

Inherited Members

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

Constructors

GetIngredientByIdQueryHandler\(IIngredientRepository\)

public GetIngredientByIdQueryHandler(IIngredientRepository ingredientRepository)

Parameters

ingredientRepository IIngredientRepository

Methods

Handle\(GetIngredientByIdQuery, CancellationToken\)

Handles a request

public Task<Result<Ingredient>> Handle(GetIngredientByIdQuery request, CancellationToken cancellationToken)

Parameters

request GetIngredientByIdQuery

The request

cancellationToken CancellationToken

Cancellation token

Returns

Task <Result<Ingredient\>\>

Response from the request

Last modified: 21 May 2024