public IActionResult RemoveQuestions(int id) { QuestionOperation question = new QuestionOperation(); if (question.RemoveQuestion(id)) { return(Ok(new { flag = true, msg = "deletion successfull", status = 200, })); } return(BadRequest(new { flag = false, msg = "data not found", status = 404 })); }
public IActionResult EditviewQuestions(int id) { QuestionOperation question = new QuestionOperation(); ViewCustomModel data = question.EditViewQuestion(id); if (data != null) { return(Ok(data)); } return(BadRequest(new { msg = "data not found", status = 404 })); }
public IActionResult ViewQuestions(String id) { id = HttpUtility.UrlDecode(id); QuestionOperation question = new QuestionOperation(); var data = question.ViewQuestion(id); if (data != null) { return(Ok(data)); } else { return(BadRequest(new { msg = "Not Found", status = 404 })); } }
public List <QuestionObject> GetAllQuestion() { QuestionOperation qo = new QuestionOperation(); return(qo.GetAllQuestion()); }