none
Help with the select when groupin in LINQ

    Question

  •  Hi,

    can anybody tell me please how can I write this code but using only the key in the select statement and not having duplicates?

       var bbb = (from z in db.t
                             group z by new { z.b1, z.a1} into ps
                             where gs.Average(z=> z.qty) > 1000
                             select new
                             {
                                 ps.Key,     
                                 avg =
                                     ps.Average(z=> z.qty)
                             });
                  

    thanks


    Monday, March 31, 2014 8:06 PM

All replies