If you want to show a list of string product names and be able to retrieve their int id you can for example:
combo.DisplayMember = "DisplayColumnName";
combo.ValueMember = "IdColumnName";
combo.DataSource = context.TableName.Select(r =>
new KeyValuePair<int, string>(r.IdColumnName, r.DisplayColumnName)).ToList();
You need to replace TableName, DisplayColumnName and IdColumnName with your actual values.
To get the ID of what the user selected (eg for further db queries) you can:
var id = (int)combo.SelectedValue;
If you want the string of what the user selected:
var s = ((KeyValuePair)combo.SelectedItem).Value;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…