我像这样在我的项目中填充了组合框
CB_City.ItemsSource = c.Cities;
CB_City.DisplayMemberPath = "city1";
CB_City.SelectedValuePath = "city_id";
CB_City.SelectedValue = 517;
我使用实体框架和 c# ,如何按升序对结果进行排序?
仍然不能(我尝试了很多)我附上了完整的代码
using (MorEntities1 c = new MorEntities1())
{
CB_City.ItemsSource = c.Cities;
CB_City.DisplayMemberPath = "city1";
CB_City.SelectedValuePath = "city_id";
CB_City.SelectedValue = 517;
}