I have a little misunderstanding here why do i have here an error do i need to parse it what is wrong with this code ?
UberTrackerEntities ctx = UberFactory.Context;
IEnumerable<HtUser> users = HtUser.GetAll();
string selectedBU = rcbBusinessUnits.SelectedValue;
string selectedDepartment = rcbDepartment.SelectedValue;
HtDepartment department = ctx.HtDepartments.SingleOrDefault(d => d.DepartmentId ==selectedDepartment);
if (department != null)
{
users = users.Where(u => u.HtDepartments.Contains(department));
}
Thanks for help and fast answer !
PS:I thing I'm just over thing it it seams just to be a stupid little error ...
d.DepartmentIdandselectedDepartmentis anint, and the other astring, and you can't compare the two with==.