public async Task <IActionResult> CreateShipment(NewShipment json) { try { var req = GrpcNewShipmentRequestFactory.GetFrom(json); await ShippingClient.CreateShipment(req); return(EmpityAnswer); } catch (Exception e) { throw; } }
public GrpcNewShipmentRequestFactory(NewShipment req) => Req = req;
public static GrpcNewShipmentRequest GetFrom(NewShipment shipment) => new GrpcNewShipmentRequestFactory(shipment).Get();