「selectedBA」は、実行時に決定される値を含む変数です。これを linq ステートメントに組み込むにはどうすればよいですか。これにより、項目で動的列 selectedBA が True である SPList 内のすべての項目が得られます。おそらく単純なことだと思います...動的列はSPListのブール型です
DataTable dt = siteTemplateList.GetItems().GetDataTable();
var query = from template in dt.AsEnumerable()
where template[selectedBA].Equals(true)
select template;