Uki Uki - 1 year ago 73
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?.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download