public IActionResult Delete([FromForm] SolutionProblemViewModel solution) { _solutionRepository.Delete(solution.SolutionId); _solutionRepository.Save(); return(RedirectToAction(nameof(ProblemSolution), new { id = solution.ProblemId })); }
public void RemoveSolution(int id) { var solution = solutionsRepository.GetById(id); solutionsRepository.Delete(solution); }