public void InitMembers(ISession session) { JobTitles = session.QueryOver <JobTitle>() .OrderBy(x => x.Name).Asc .List() .Select(x => new SelectListItem() { Text = x.Name, Value = x.Id.ToString() }); Departments = session.QueryOver <Department>() .OrderBy(x => x.Name).Asc .List() .Select(x => new SelectListItem() { Text = x.Name, Value = x.Id.ToString() }); Employees = session.QueryOver <Employee>() .Where(x => x.IsActive) .OrderBy(x => x.FirstName).Asc .OrderBy(x => x.LastName).Asc .List() .Select(x => new SelectListItem() { Text = x.FullName, Value = x.Id.ToString() }); if (!string.IsNullOrEmpty(JobTitle)) { JobTitleId = JobTitle.Split(',').Select(x => long.Parse(x)).ToArray(); } if (!string.IsNullOrEmpty(Department)) { DepartmentId = Department.Split(',').Select(x => long.Parse(x)).ToArray(); } if (!string.IsNullOrEmpty(Employee)) { EmployeeId = Employee.Split(',').Select(x => long.Parse(x)).ToArray(); } }