Sunday, June 08, 2008 10:55 PM
by
plitwin
LINQ Query Syntax C# vs. VB vs. SQL
FWIW, I found it helpful to create this table to compare the query syntax of C# and VB and how it translates into SQL.
| C# LINQ | VB LINQ | ANSI SQL |
| from | From | FROM |
| select | Select | SELECT |
| where | Where | WHERE |
| orderby | Order By | ORDER BY |
| join | Join | JOIN |
| group | Group By | GROUP BY |
| Distinct() | Distinct | DISTINCT |
| into | Into | INTO |
| let | Let | AS |
| Count(), Sum(),… | Aggregate | COUNT, SUM,… with no group |
| Skip() | Skip | n/a |
| SkipWhile() | Skip While | n/a |
| Take() | Take | n/a |
| TakeWhile() | Take While | n/a |