我实现了以下方法来获取要绑定到下拉列表的部门数组
public object[] GetDepartmentOptions()
{
var departments = from p in context.per_Departments
where p.active == true
select new { DisplayText = p.departmentNameEn,
Value = p.departmentId };
return departments.ToArray();
}
我想在绑定之前在这个数组中插入对象
object =new { DisplayText = "Choose", Value = 0 };