title: how to set checkbox value from entityFramework list
body: <p>I have to set checkbox Checked or Unchecked based on value from List which I'm getting from Entity framework:</p>
  
  <p>Here is my code but they are not working giving me error "Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement"</p>
  
  <pre><code>foreach (var item in leader)
  {
  item.IsTopLeader == true ? chkIsTopLeader.Checked = true : chkIsTopLeader.Checked = false;
  item.IsSubLeader == true ? chkIsSubLeader.Checked = true : chkIsSubLeader.Checked = false;
  item.IsTeacher == true ? chkIsTeacher.Checked = true : chkIsTeacher.Checked = false;
  }
  </code></pre>