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 with int list #122

Closed
frankiDotNet opened this issue Nov 16, 2017 · 1 comment
Closed

Join with int list #122

frankiDotNet opened this issue Nov 16, 2017 · 1 comment

Comments

@frankiDotNet
Copy link

I am trying to inner join on a int list but it does not work:

public class Person
      {
         public int Id { get; set; }
         public String Name { get; set; }
         public String FirstName { get; set; }
         public Int32 Status { get; set; }
      }
// This works
// query is a list of persons..
var idList = new List<int>() {1, 2, 3, 4};
var dynamicQuery = query
                .Join(
                    idList , x => x.Id, y => y, (left, right) => new {left, right});

The dynamic expression does not work, I don`t know if it is the syntax, but I am getting a System.TypeInitializationException:

var dynamicQuery = query
            .Join(
                idList, "it.Id", "it", "new (outer as card, inner as ids)");

var dynamicQuery = query
            .Join(
                idList, "it.Id", "i => i", "new (outer as card, inner as ids)");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants