Skip to content

Instantly share code, notes, and snippets.

Created June 1, 2022 21:42
What would you like to do?
public class PickupHandler : IRequestHandler<Pickup>
private readonly IShipmentRepository _shipmentRepository;
public PickupHandler(IShipmentRepository shipmentRepository)
_shipmentRepository = shipmentRepository;
public async Task<Unit> Handle(Pickup request, CancellationToken cancellationToken)
var shipment = await _shipmentRepository.Get(request.ShipmentId);
await _shipmentRepository.Save(shipment);
return Unit.Value;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment