在做出新选择时,我如何添加一个下拉列表来更新“员工”视图?我想在选择新的下拉记录后自动刷新员工页面。
public ActionResult Employees(string Department)
{
//return View(db.Employees.Where(_ => _.Department == Department).ToList());
// return View(db.Employees.ToList());
var employees = from m in db.Employees
where m.Department == Department ||Department == null ||Department == ""
select m;
return View(employees.ToList());