示例#1
0
        public async Task <IActionResult> DeleteConfirmed(Guid id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            await _repository.Delete(id);

            return(RedirectToAction(nameof(Index)));
        }
示例#2
0
        public async Task <IActionResult> OnPostAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            await _repository.Delete(id);

            return(RedirectToPage("./Index"));
        }
示例#3
0
 public void DeletePlane(int id)
 {
     _planeRepository.Delete(_planeRepository.GetById(id));
     SavePlane();
 }
 public void DeletePlaneById(int id)
 {
     planeRepo.Delete(id);
 }