06 novembre 2008

Utilisation de Linq

Pour utiliser Linq en C# :
using System.Linq;

Requête simple :
from Table in DataContext.Table select Table

Compter le nombre d'éléments dans une requête :
(from Table in DataContext.Table select Table).Count()

Aucun commentaire:

How I Turned GitHub Copilot Into My Coding Sidekick (And Why It Feels Like Cheating)

  How I Turned GitHub Copilot Into My Coding Sidekick (And Why It Feels Like Cheating) Spoiler: It’s not cheating. It’s collaboration —with...