public IActionResult Delete(int Id) { var quizId = _service.GetById(Id).QuizId; _service.Delete(Id); return(Redirect("~/Quiz/Questions?Id=" + quizId)); }
public IActionResult Delete(int Id) { if (_service.Delete(Id)) { return(Ok(GetResponse())); } else { return(Ok(GetResponse(message: "Record Not found"))); } }