h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

LINQ Hints

LINQ :
  LINQ -- Language INtegrate Query.
  It supporst all .Net Language.
LINQ -- Data Provider:

  1.    LINQ To Object
  2.   LINQ To ADO.NET
  3.   LINQ To XML


     LINQ To ADO.NET:

  •              LINQ To SQL.
  •              LINQ To Entity Framework.
  •              LINQ To Dataset.

Query Basics:
         Query Expression consists of set of Clauses written in a declarative Syntax similar to SQL /XQuery.
  Query must:

  •      Begin with from Clause.
  •      End with select/Group clause.
  •      Between one or more of following clauses using
  •              Where,Join,from orderby,let,into.

Aggragate Clause:
    Select ,Distinct,Order bymTake,Takewhile,skip,skipwhile,wheremjoinmgroupbymlet,into

Two ways to write LINQ Query:

  1.    Query syntax -- Use Query
  2.    Method Syntax -- Uses Lambda Expression.

Lambda Expression:
    => Goes into Separate Parameters from method body.

LINQ To Object:

  • Object supports either IEnumerable or Ienumerable<t>
  • Array,ArrayList,Collection,Generic Collection.
  • Using System.LINQ namespace.

LINQ To SQL:
  •     Using System.Data.LINQ namespace.
  •     Requires Entity  classes which you can build using the ORD.
  •     ORD-- Object Relational Designer.
  •     E-R data models will use for Other Database.

LINQ To Dataset:

  •       Collections of data from ADO.NET and Put into Dataset or DataTable.