Class AddProductAllergenCommandHandler
Namespace: Restaurant.Application.Requests.Product
Assembly: Restaurant.Application.dll
public sealed class AddProductAllergenCommandHandler : IRequestHandler<AddProductAllergenCommand, Result<Product>>
Inheritance
object ← AddProductAllergenCommandHandler
Implements
IRequestHandler<AddProductAllergenCommand, Result<Product\>\>
Inherited Members
object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)
Constructors
AddProductAllergenCommandHandler\(IAllergenRepository, IProductRepository, IAuthorizationService, IHttpContextAccessor, IUnitOfWork\)
public AddProductAllergenCommandHandler(IAllergenRepository allergenRepository, IProductRepository productRepository, IAuthorizationService authorizationService, IHttpContextAccessor httpContextAccessor, IUnitOfWork unitOfWork)
Parameters
allergenRepository IAllergenRepository
productRepository IProductRepository
authorizationService IAuthorizationService
httpContextAccessor IHttpContextAccessor
unitOfWork IUnitOfWork
Methods
Handle\(AddProductAllergenCommand, CancellationToken\)
Handles a request
public Task<Result<Product>> Handle(AddProductAllergenCommand request, CancellationToken cancellationToken)
Parameters
request AddProductAllergenCommand
The request
cancellationToken CancellationToken
Cancellation token
Returns
Task <Result<Product\>\>
Response from the request
Last modified: 21 May 2024