Esempio n. 1
0
        public IActionResult GetByMethod(string method)
        {
            if (String.IsNullOrEmpty(method))
            {
                ParameterNullException e = new ParameterNullException("The parameter cannot be null");
                return(BadRequest(e.Message));
            }

            try
            {
                return(Ok(_shipService.GetByMethod(method)));
            }
            catch (ShipmentNotFoundException e)
            {
                return(BadRequest(e.Message));
            }
        }