public IActionResult DeleteSurveyEntity([FromRoute] int surveyId) { try { return(Ok(_logic.DeleteSurvey(AdminId, surveyId))); } catch (Exception e) { return(BadRequest(e)); } }
public ActionResult DeleteSurvey(int id) { surveyLogic.DeleteSurvey(id); int userId = CurrentUserSession.Attende.ID; string userName = string.Concat(CurrentUserSession.Attende.FirstName, " ", CurrentUserSession.Attende.Lastname); commonLogic.SaveLog("Survey", "Delete", userId, $"The survey id: {id} is deleted by {userName}."); return(Redirect(Url.Action("Index") + "#Survey")); }