Hi,
When running a query like this, it returns 0 results and it turns out
its inner joining every object, although i have specified outer-join =
true on the user -> costcentre object.
var users = _repository.Query<User>();
if (!isSuperUser)
users = users.Where(x => x.Company == user.Company);
if (!string.IsNullOrEmpty(search))
{
users = users.Where(x => x.Email.Contains(search)
||
x.FirstName.Contains(search)
|| x.LastName.Contains(search)
||
x.Company.CompanyName.Contains(search)
||
x.CostCentre.CostCentreCode.Contains(search)
);
}
I have tried using Fetch(x=>x.CostCentre) which does do the outer join
properly but the inner join still exists in the query.
Any ideas?
Adam
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.