Пример #1
0
        public async Task <HttpResponseMessage> GetVehicleMake(int id)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "Invalid data"));
            }

            VehicleMakeServ vehicleMake = await VehicleModelService.GetMake(id);

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

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