public void DeleteInventoryById(string inventoryId) { var carId = _inventoryRepository.GetInventoryDetailsById(inventoryId).CarId; _inventoryRepository.DeleteInventoryById(inventoryId); _carRepository.DeleteCarById(carId.ToString()); _repairRepository.DeleteRepairDetailsByCarId(carId.ToString()); _mediaRepository.DeleteMediaFromInventory(inventoryId); }
public IActionResult Delete(int Id) { _carRepository.DeleteCarById(Id); return(RedirectToAction("Index")); }
public int DeleteCarById(long idCar) { return(_carRepository.DeleteCarById(idCar)); }