Saturday, March 1, 2008

Use LINQ to Link You Up

Today's early morning ( what I mean was really early, is 2.00 a.m! ) One of my e-pal, Mark (Used to call him 'Marky'...Lol ) contacted me via Skype and said he need my favor. ( Well, when someone said 'need a favor' to me, is mean 'I need to do some hard work later on' )...

He tole me, that he decided to create a new LINQ website, that will mostly talk about the db4o and the object database. I'm did asked him, why he want to create such kind of website? He answered me, "The LINQ will become an essential, not only today but far more important in the future!"

Since he had said so, then I'm just help he out to write a user guide for him...

OK, guys. Do you all know, what is LINQ? LINQ is an abbreviation for "Language Integrated Query" is Microsoft.NET Framework component, that use to add the native data querying capabilities to .NET languages using a syntax reminiscent of SQL. As your acknowledgment, many of the concepts that LINQ has introduced, have to undergo some serious test in Microsoft's research project first.

LINQ main function is try to define a set of query operators that can be used to query, project and filter data in arrays, enumerable classes, XML, object database, and third party data sources. It is requires the data to be encapsulated as object, before it allows any data source to be queried. Otherwise, if the data source does not natively store data as objects, then the data need to be mapped to the object domain.

Below here is the list of commonly used Standard Query Operators:

  • Select / SelectMany
  • Where
  • Join / GroupJoin
  • Take / TakeWhile
  • Skip / SkipWhile
  • OfType
  • Concat
  • OrderBy / ThenBy
  • Reverse
  • GroupBy
  • Distinct
  • Union / Intersect / Except
  • EqualAll
  • First / FirstOrDefault / Last / LastOrDefault
  • Single
  • ElementAt
  • Any / All / Contains
  • Count
  • Sum / Min / Max / Average / Aggregate


LINQ for SQL Designer

The LINQ to SQL designer has allows LINQ to be used to query the SQL Server databases as well as SOL Server Compact databases. The SQL Server data will resides on a remote server, and because it already includes a querying engine on it, so LINQ to SQL does not use the query engine of LINQ. Instead, it will convert a LINQ query to SQL query, which all of the data will be sent to SQL Server for processing.

LINQ for XML

The LINQ to XML provider will converts an XML document to a serial of collection of XElement objects, which are then be queried against using the local execution engine, that is provided as a part of the implementation of the standard query operator.

Lastly, for more information, you can check this out at db4o.

Good day.

No comments: