public IActionResult DeleteUserFromClass(string userName, int classId) { IActionResult result = Unauthorized(); try { _db.DeleteUserFromClass(userName, classId); result = Ok(); } catch (Exception) { result = BadRequest(new { Message = "Failed to remove user from class" }); } return(result); }