Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Last active October 18, 2023 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/12cae6c8fd5ef49cbd01ea28048828c9 to your computer and use it in GitHub Desktop.
Save dcomartin/12cae6c8fd5ef49cbd01ea28048828c9 to your computer and use it in GitHub Desktop.
public class GetOrderQueryHandler : IRequestHandler<GetOrderQuery, OrderResponse>
{
private readonly IGetOrderById _getOrderById;
public GetOrderQueryHandler(IGetOrderById getOrderById)
{
_getOrderById = getOrderById;
}
public async Task<OrderResponse> Handle(GetOrderQuery request)
{
var orderResponse = await _getOrderById.ExecuteAsync(request.OrderId);
return orderResponse;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment