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