I believe Value cannot be null is a standard message from ArgumentNullException . If you are debugging and extending the error message, you will see the actual parameter name causing the null argument to be thrown.
Are any of usersAd , usersWithSecurity , userRepository null?
EDIT:
Well, with the additional information you provided in your comment, I now see the problem. usersWithSecurity is null, and this cannot be. The source parameter is the name of the IEnumerable or IQueryable in all extension methods found in the Enumerable and Queryable classes.
If you fix this, it should work as you expect, a left join and thatβs it.
usersWithSecurity = usersWithSecurity ?? Enumerable.Empty<User>(); // or similar
source share