public IActionResult Delete(int id) { var surveyToDelete = _adminManager.GetSurvey(id); if (surveyToDelete == null) { return(NotFound()); } _adminManager.DeleteSurvey <SurveyDTO>(surveyToDelete); _adminManager.SurveySave(); return(NoContent()); }