Owneat Technical Guide main Help

Class DeleteCategoryCommandHandler

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

public sealed class DeleteCategoryCommandHandler : IRequestHandler<DeleteCategoryCommand, Result<Unit>>

Inheritance

object ← DeleteCategoryCommandHandler

Implements

IRequestHandler<DeleteCategoryCommand, Result<Unit\>\>

Inherited Members

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

Constructors

DeleteCategoryCommandHandler\(ICategoryRepository, IMenuRepository, IAuthorizationService, IHttpContextAccessor, IUnitOfWork\)

public DeleteCategoryCommandHandler(ICategoryRepository categoryRepository, IMenuRepository menuRepository, IAuthorizationService authorizationService, IHttpContextAccessor httpContextAccessor, IUnitOfWork unitOfWork)

Parameters

categoryRepository ICategoryRepository

menuRepository IMenuRepository

authorizationService IAuthorizationService

httpContextAccessor IHttpContextAccessor

unitOfWork IUnitOfWork

Methods

Handle\(DeleteCategoryCommand, CancellationToken\)

Handles a request

public Task<Result<Unit>> Handle(DeleteCategoryCommand command, CancellationToken cancellationToken)

Parameters

command DeleteCategoryCommand

cancellationToken CancellationToken

Cancellation token

Returns

Task <Result<Unit\>\>

Response from the request

Last modified: 21 May 2024