babsevensix

Il blog di Alberto
posts - 94, comments - 81, trackbacks - 11

WPF e Silverlight – LINQ

Una query linq più complessa :

 

Dim categories = From prod In products _

                 Group prod By prod.Category _

                 Into PrezzoPiuEconomico = Min(prod.UnitPrice) _

                 Select Category, PrezzoPiuEconomico

 

O

 

Dim categories = From prod In products _

                 Group prod By prod.Category _

                 Into Prods = Group, minPrice = Min(prod.UnitPrice) _

                 Let CheapestProducts = (From p In Prods _

                                         Where p.UnitPrice = minPrice) _

                 Select Category, CheapestProducts

Print | posted on martedì 23 febbraio 2010 17:42 | Filed Under [ WPF e Silverlight ]

Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET