System.Linq.Dynamic.Core
System.Linq.Dynamic.Core copied to clipboard
support return Tuple
I want to pass the specified fields and then return tuple. It's ok with linq to db but error with EF 6. The exception is : Only parameterless constructors and initializers are supported in LINQ to Entities.
code:
async Task Main()
{
Pick<(string, string)>("x=>new {x.AuthorCode,x.AuthorName}").Dump();
}
public List<T> Pick<T>(string selector)
{
return this.Author.Select<T>(selector).ToList();
}
can be improved to support return tuple as linq to db?
Related to https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/491