예제 #1
0
        public IActionResult OnPost()
        {
            CheckIn deletedCheckIn = checkinReporitory.Delete(CheckIn.Id);

            if (deletedCheckIn == null)
            {
                return(RedirectToPage("/NoFound"));
            }

            return(RedirectToPage("Index"));
        }
예제 #2
0
        public IActionResult Delete(int id)
        {
            var checkIn = _checkInRepo.GetById(id);

            if (checkIn == null)
            {
                return(NotFound());
            }

            _checkInRepo.Delete(checkIn);

            return(NoContent());
        }