We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
var q = new Model1().Products.Select(p => new { Item1 = p.ProductID, Item2 = new { Item1 = p.ProductName } });
can be built as
var p = Expression.Parameter(typeof(Product)); var t1 = typeof(Tuple<int, Tuple<string>>); var t2 = typeof(Tuple<string>); var q = new Model1().Products.Select( Expression.Lambda<Func<Product, Tuple<int, Tuple<string>>>>( Expression.New( t1.GetConstructor(new[] { typeof(int), t2 }), new Expression[] { Expression.Property(p, "ProductID"), Expression.New( t2.GetConstructor(new[] { typeof(string) }), new Expression[] { Expression.Property(p, "ProductName") }, t2.GetProperty("Item1") ) }, t1.GetProperty("Item1"), t1.GetProperty("Item2") ), p ) );
TODO check compatibility:
Select
GroupBy
The text was updated successfully, but these errors were encountered:
Code: https://github.com/DevExpress/DevExtreme.AspNet.Data/tree/experiment/tuples
Pros:
AnonType
Cons:
Sorry, something went wrong.
AlekseyMartynov
No branches or pull requests
can be built as
TODO check compatibility:
Select
ok,GroupBy
fails, fix requested)The text was updated successfully, but these errors were encountered: