Ejemplo n.º 1
0
        public async Task <HttpResponseMessage> GetById(int id)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "Invalid data"));
            }

            VehicleMakeServ vehicleMake = await VehicleMakeService.GetById(id);

            VehicleMake make = mapper.Map <VehicleMake>(vehicleMake);

            return(Request.CreateResponse(HttpStatusCode.OK, make));
        }