.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Imran Ghani
Sohaib Khalid

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Lambda + C#

Posted By: koji80     Posted Date: March 28, 2012    Points:5   Category :C#
I have to make a groupby columns by dynamically ok so this example:

System.Linq.Expressions.Expression <Func <DataRow, object>> result = (g) => new {col1 = g [_colunas.Split (') [0]], col2 = g [_colunas.Split (', ') [1]]},. But, how do the same thing to get the select example
tb.AsEnumerable (). AsQueryable (). GroupBy (result). Select (sel => new {sel.Key.ToString cols = () = QTE sel.Count ()});

cols | QTE
"F = {col1, col2 = SC}" | 408

Col1 | Col2 | Qte
"F" | "SC" | 408


No response found. Be the first to respond this post
Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend