Jun 12 2009

LINQ: Max

Category: ASP.NET | LINQLatif @ 16:47

LINQ da SQL deki max islemini nasil mi yapariz?

Asagidaki sekilde,

MDDBDataContext dc = new MDDBDataContext();

var lastNumber = (from r in dc.RevenueSharings
                                  select (int?)r.StatementNumber).Max();

 

SQL server profiler tarafinda asagidaki sekilde goreceksiniz...

SELECT MAX([t0].[StatementNumber]) AS [value]
FROM [dbo].[RevenueSharing] AS [t0]

Tags: , , ,

Comments

1.
Recep GÜZEL Recep GÜZEL Turkey says:

ben de tam son kaydı nasıl alırım diye bakınıyordum. Çok güzel olmuş eline sağlık. Smile

2.
Tagesgeld Rechner Tagesgeld Rechner Germany says:

I guess there is always an easier way ...

3.
privat Krankenversicherung privat Krankenversicherung Austria says:

You look incredibly knowledgeable in your sphere.

4.
crane hire crane hire United Kingdom says:

Hi vey nice interesting blog im from london i found this on yahoouk I'm in the crane hire company business,i found this blog very interesting good luck with it i will return to this blog soon

5.
Memorials Memorials United States says:

Hello nice blog im from scotland i found this on bing I seen it on the top ten searches i found this blog very interesting good luck with it i will return to this blog soon

6.
pingback cheaphomeideas.com says:

Pingback from cheaphomeideas.com

The Best Way To Predict The Future | Cheaphomeideas.com

7.
pingback supermallamerica.com says:

Pingback from supermallamerica.com

Worldwide Calling Cards – Inexpensive Roaming Communication | Supermallamerica.com Blog

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading