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)); }