public IActionResult DeleteProgramConfirmed(int Id)
        {
            EventProgram prog = _programRepository.GetProgram(Id);

            _programRepository.DeleteProgram(prog.Id);
            return(RedirectToAction("ViewPrograms"));
        }
Beispiel #2
0
        public IActionResult Delete(int id)
        {
            var deleteProgram = programRepository.DeleteProgram(id);

            return(Json(new { deleteProgram }));
        }
Beispiel #3
0
        public async Task <int> Handle(DeleteProgramCommand request, CancellationToken cancellationToken)
        {
            request.ProgramModel.Validate();

            return(await _programRepository.DeleteProgram(request.ProgramModel));
        }