Owneat Technical Guide main Help

Class GetAllUsersByRestaurantIdQueryHandler

Namespace: Identity.Application.Requests.Handlers.User
Assembly: Identity.Application.dll

Handler that returns all the users in the database that has the requested restaurantId.

public sealed class GetAllUsersByRestaurantIdQueryHandler : IRequestHandler<GetAllUsersByRestaurantIdQuery, Result<IEnumerable<UserResponse>>>

Inheritance

object ← GetAllUsersByRestaurantIdQueryHandler

Implements

IRequestHandler<GetAllUsersByRestaurantIdQuery, Result<IEnumerable<UserResponse\>\>\>

Inherited Members

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

Constructors

GetAllUsersByRestaurantIdQueryHandler\(IUserRepository, IAuthorizationService, IHttpContextAccessor\)

public GetAllUsersByRestaurantIdQueryHandler(IUserRepository repository, IAuthorizationService authorizationService, IHttpContextAccessor httpContextAccessor)

Parameters

repository IUserRepository

authorizationService IAuthorizationService

httpContextAccessor IHttpContextAccessor

Methods

Handle\(GetAllUsersByRestaurantIdQuery, CancellationToken\)

Handles a request

public Task<Result<IEnumerable<UserResponse>>> Handle(GetAllUsersByRestaurantIdQuery request, CancellationToken cancellationToken)

Parameters

request GetAllUsersByRestaurantIdQuery

The request

cancellationToken CancellationToken

Cancellation token

Returns

Task <Result< IEnumerable < UserResponse \>\>\>

Response from the request

Last modified: 21 May 2024