public async Task <IActionResult> deleteVehicleMake(int id) { var vehicleMake = await _vehicleMakeRepo.DeleteVehicleMake(id); if (vehicleMake == null) { return(NotFound(new { error = "This vehicleMake was not found!" })); } return(Ok(vehicleMake)); }
public async Task <IActionResult> Delete(int id) { await DbContext.DeleteVehicleMake(id); return(RedirectToAction("Index")); }
public async Task <bool> DeleteVehicleMake(VehicleMake vehicleMake) { bool result = await _vehicleMakeRepository.DeleteVehicleMake(vehicleMake); return(result); }