public IActionResult DeleteProgramConfirmed(int Id) { EventProgram prog = _programRepository.GetProgram(Id); _programRepository.DeleteProgram(prog.Id); return(RedirectToAction("ViewPrograms")); }
public IActionResult Delete(int id) { var deleteProgram = programRepository.DeleteProgram(id); return(Json(new { deleteProgram })); }
public async Task <int> Handle(DeleteProgramCommand request, CancellationToken cancellationToken) { request.ProgramModel.Validate(); return(await _programRepository.DeleteProgram(request.ProgramModel)); }