Uki Uki - 8 months ago 40
C# Question

Why does the c#(web) linq syntax is different in vb(windows) linq syntax?

In c# web linq syntax for example

var sample = (from a in db.sample where == id).singleordefault();

while in windows linq

dim sample = (from a in db.sample where = id)

Because they have a different environment?.


The listed approach can be classified into LINQ method syntax and query syntax and both are semantically identical. Some of us find query syntax is simple and easy to read while others prefer method syntax because of it's expressiveness.

Following will help you to clarify;

Query and Method Syntax