Here I ll introduce Linq (Language INtegrated Query).  Linq, in simple language, is a way to access to data.  The data can be Database, XML, Entities etc.  Linq is a convenient way to access to different type data.  It ll come in handy through out your coding to master this.

Linq has query and method.


Let’s cover query first.

The basic Linq query look like this;

For starter here are basic terms to cover

from, where, select, group, orderby, into, join.


This is where you specify the source.

The basic use of form is;

from [your scope variable] in [data source]


This is where you state condition of your selection of data.


This is to specify fields and or object you want to select within your scope variable.  At example above, I have specified Title field in my scope variable a, but if you want the whole data you can simply say;


To note; what you can write in query, you can write in Method statement, but not all thing you can write in Method is available in query. And I ll cover this more later.

Here is Linq with method statements.



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.