コード例 #1
0
        private dynamic AdicionarComSp(dynamic arg)
        {
            var dto = this.Bind <Product>();

            try
            {
                _productService.AdicionarComSp(dto);
                return(HttpStatusCode.Created);
            }
            catch (Exception excecao)
            {
                if (excecao is ParametroInvalidoException)
                {
                    return(ExceptionResponse(excecao, HttpStatusCode.BadRequest));
                }

                return(ExceptionResponse(excecao, HttpStatusCode.InternalServerError));
            }
        }