public IActionResult GetPermissions(int id) { try { var newPermissionUtils = new PermissionUtils(); var toGet = new Permission(); toGet = newPermissionUtils.GetPermissionById(id); if (toGet.EmpPermiss > 0) { return(new ObjectResult(toGet)); } return(NotFound($"There is no Info for Permission Level {id}")); } catch (Exception e) { return(NotFound($"There is no Info for Permission Level {id}! " + e)); } }