public IActionResult DeleteRenter(string id) { Renters r = rentersLogic.GetOneRenter(id); Cars c = carsLogic.GetOneCar(r.CarId); if (c != null) { c.Available = true; } carsLogic.Save(); r.CarId = null; rentersLogic.DeleteRenter(id); return(RedirectToAction(nameof(ListRenters))); }
public Renters GetOneRenter(string renterid) { return(rLogic.GetOneRenter(renterid)); }