public async Task <IActionResult> Delete(int id) { var day = await dayRepository.GetByIdAsync(id); var returnLocationId = day.LocationId; await dayRepository.DeleteDay(day.Id, false); return(RedirectToAction("History", "Location", new { id = returnLocationId })); }
public async Task <IActionResult> Delete(Ride ride) { var deletePings = Request.Form["deletePings"]; ride = await rideRepository.GetByIdFull(ride.Id); if (ride is Ride) { await dayRepository.DeleteDay(ride.Day.Id, deletePings == "1"); } return(RedirectToAction("Index", "Home")); }
public void DeleteDay(int dayId) { _dayRepo.DeleteDay(dayId); }