Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Join on nullable and not nullable type throws exception #74

Closed
ghost opened this issue Apr 13, 2017 · 0 comments
Closed

Join on nullable and not nullable type throws exception #74

ghost opened this issue Apr 13, 2017 · 0 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Apr 13, 2017

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.

@StefH StefH self-assigned this Apr 15, 2017
@StefH StefH added the bug label Apr 15, 2017
@StefH StefH closed this as completed in 26ed2f4 Apr 15, 2017
StefH added a commit that referenced this issue Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant