public Vehicle AddVehicleToMemember(Vehicle vehicle) { var obj = vehicleRepository.Add(vehicle); return obj; }
public ActionResult NewVehicle(Vehicle vehicle) { if (vehicle != null) { vehicle.Id = Guid.NewGuid(); vehicleService.Add(vehicle); return Json(true); } return Json(false); }
public ActionResult EditVehicle(Vehicle vehicle) { vehicleService.Update(vehicle); return Json(true); }
public JsonResult DeleteVehicle(Vehicle vehicle) { try { return Json(vehicleService.Remove(vehicle.Id)); } catch (Exception ex) { return Json(false); } }
public Vehicle Update(Vehicle vehicle) { vehicleRepository.Update(vehicle); return vehicle; }
public Vehicle Add(Vehicle vehicle) { vehicle.Id = Guid.NewGuid(); vehicleRepository.Add(vehicle); return vehicle; }