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)");
I am trying to inner join on a int list but it does not work:
The dynamic expression does not work, I don`t know if it is the syntax, but I am getting a System.TypeInitializationException: