Beispiel #1
0
        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 }));
        }
Beispiel #2
0
        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"));
        }
Beispiel #3
0
 public void DeleteDay(int dayId)
 {
     _dayRepo.DeleteDay(dayId);
 }