public IHttpActionResult PostVehicleType(VehicleType vehicleType) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _repo.AddVehicleType(vehicleType); return(CreatedAtRoute("DefaultApi", new { id = vehicleType.Id }, vehicleType)); }
public IHttpActionResult PostVehicleType(VehicleType vehicleType) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _repo.AddVehicleType(vehicleType); return(CreatedAtRoute("DefaultApi", new { id = vehicleType.Id }, vehicleType)); }