public IActionResult OnPost() { CheckIn deletedCheckIn = checkinReporitory.Delete(CheckIn.Id); if (deletedCheckIn == null) { return(RedirectToPage("/NoFound")); } return(RedirectToPage("Index")); }
public IActionResult Delete(int id) { var checkIn = _checkInRepo.GetById(id); if (checkIn == null) { return(NotFound()); } _checkInRepo.Delete(checkIn); return(NoContent()); }