S
SIS01
im new in LINQ,
i've lookin for max/min functions for strings or dates to use in grouping
queries:
by example, i like to get the author and the min title of their books.
AUTHOR TITLE
---------------------
PLATON OMEGA
PLATON LAMDA
PLATON DELTA
DANTE BETA
DANTE ALPHA
DANTE ALFER
if i write in SQL:
SELECT author, MIN(title) AS mintitle FROM books GROUP BY author
AUTHOR mintitle
---------------------
PLATON DELTA
DANTE ALFER
and it works fine!
its simple and clear.
How can i get the same in LINQ?
Thanks in advance
i've lookin for max/min functions for strings or dates to use in grouping
queries:
by example, i like to get the author and the min title of their books.
AUTHOR TITLE
---------------------
PLATON OMEGA
PLATON LAMDA
PLATON DELTA
DANTE BETA
DANTE ALPHA
DANTE ALFER
if i write in SQL:
SELECT author, MIN(title) AS mintitle FROM books GROUP BY author
AUTHOR mintitle
---------------------
PLATON DELTA
DANTE ALFER
and it works fine!
its simple and clear.
How can i get the same in LINQ?
Thanks in advance