public static async Task <GrpcShipmentList> SearchShipments(GrpcShipmentSearchRequest grpcRequest) { try { var req = GrpcShipmentSearchRequestAdapter.Adapt(grpcRequest); var resp = await ShipmentUseCases.Search.Execute(req); return(ShipmentListPresenter.Present(resp)); } catch (Exception e) { throw; } }
public async Task <IActionResult> SearchShipments(ShipmentSearch search) { try { var req = GrpcShipmentSearchRequestFactory.GetFrom(search); var resp = await ShippingClient.SearchShipments(req); return(new ContentResult() { Content = ShipmentListPresenter.GetSerializedFrom(resp), ContentType = "application/json" }); } catch (Exception e) { throw; } }