public JsonResult EditVehicleModel(VehicleModel vehicleModel) { if (vehicleModel != null) { _vehicleModelService.Update(vehicleModel); return Json(true); } return Json(false); }
public JsonResult AddVehicleModel(VehicleModel vehicleModel) { if (vehicleModel != null) { vehicleModel.Id = Guid.NewGuid(); _vehicleModelService.Add(vehicleModel); return Json(true); } return Json(false); }
public JsonResult DeleteVehicleModel(VehicleModel vehicleModel) { try { if (vehicleModel != null) { _vehicleModelService.Remove(vehicleModel.Id); return Json(true); } return Json(false); } catch (Exception ex) { return Json(false); } }
public VehicleModel Update(VehicleModel vehicleModel) { _vehicleModelRepository.Update(vehicleModel); return vehicleModel; }
public VehicleModel Add(VehicleModel vehicleModel) { _vehicleModelRepository.Add(vehicleModel); return vehicleModel; }