A join on a nullable type with a not nullable type works in a normal Linqquery:
var realQuery = people.AsQueryable().Join(
pets,
person => person.Id,
pet => pet.NullableOwnerId,
(person, pet) => new { OwnerName = person.Name, Pet = pet.Name });
But the same with dynamic linq throws an exception:
var dynamicQuery = people.AsQueryable().Join(
pets,
"it.Id",
"NullableOwnerId",
"new(outer.Name as OwnerName, inner.Name as Pet)");
I think it does this because the types do not match?
I forked this repo and wrote a unittest which fails. Check this commit for the complete test.
A join on a nullable type with a not nullable type works in a normal Linqquery:
But the same with dynamic linq throws an exception:
I think it does this because the types do not match?
I forked this repo and wrote a unittest which fails. Check this commit for the complete test.