Owneat Technical Guide main Help

Class CreateIngredientCommandHandler

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

public sealed class CreateIngredientCommandHandler : IRequestHandler<CreateIngredientCommand, Result<Ingredient>>

Inheritance

object ← CreateIngredientCommandHandler

Implements

IRequestHandler<CreateIngredientCommand, Result<Ingredient\>\>

Inherited Members

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

Constructors

CreateIngredientCommandHandler\(IIngredientRepository, IUnitOfWork\)

public CreateIngredientCommandHandler(IIngredientRepository ingredientRepository, IUnitOfWork unitOfWork)

Parameters

ingredientRepository IIngredientRepository

unitOfWork IUnitOfWork

Methods

Handle\(CreateIngredientCommand, CancellationToken\)

Handles a request

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

Parameters

request CreateIngredientCommand

The request

cancellationToken CancellationToken

Cancellation token

Returns

Task <Result<Ingredient\>\>

Response from the request

Last modified: 21 May 2024