I have a department object, and that object contains a list of employees. How do I get a department that a specific employee works in? I have a generic FindAll
IQueryable<Department> FindAll(params Expression<Func<Department, object>>[] includeProperties)
I then tried
FindAll().Where(x => x.Employee.Any(y => y.Name == name)).FirstOrDefault();
.Nameis a String. Should it not bey.Name.Equals(name)Find()?deparmentmodel