I'm making an ODP.NET database application for my school project using wpf. I have a list of checkboxes corresponding to table's columns. Is there a nicer way of building a select statement than just going through a foreach loop?
I've looked into OracleCommandBuilder Class but it didn't seem to have what i was looking for.
private IEnumerable<CheckBox> allC = employeesC = Employees.Children.OfType<CheckBox>();
string selectStatement = "SELECT ";
foreach (CheckBox cb in allC)
{
if (cb.IsChecked ?? false)
{
selectStatement += cb.Content + ", ";
}
}