Esempio n. 1
0
        public HttpResponseMessage SaveCar(Car sendCar)
        {
            try
            {
                CarBusiness carbusiness = new CarBusiness();
                int         idCar       = carbusiness.SaveCar(sendCar);

                return(Request.CreateResponse(HttpStatusCode.OK, "Veículo" + idCar + "adicionado"));
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, ex.ToString()));
            }
        }