示例#1
0
        public ActionResult<Vehicle> GetVehicle(int id)
        {
            var vehicle = _vehicleBusiness.Get(id);

            if (vehicle == null)
                return NotFound();

            return vehicle;
        }
示例#2
0
 public ActionResult <Vehicle> Get(int id)
 {
     try
     {
         Vehicle vehicle = _vehicleBusiness.Get(id);
         return(Ok(vehicle));
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }