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