Category Archives: LINQ/EF

Article: LINQ to XML Programming using Visual Basic 2008

  Hai,   My new article on "LINQ to XML programming using Visual Basic 2008" got published here http://www.aspfree.com/c/a/VB.NET/LINQ-to-XML-Programming-Using-Visual-BasicNET-2008/.   Another article on on "XML DOM programming using Visual Basic 2005" got published here http://www.aspfree.com/c/a/Windows-Scripting/Visual-Basic-2005-XML-Programming-Using-XML-DOM/   thanks Jag

Posted in LINQ/EF | Tagged | Leave a comment

Querying LINQ to SQL: Grouping and Aggregating

  My new article got published here http://www.aspfree.com/c/a/.NET/Grouping-and-Aggregating-When-Querying-LINQ-to-SQL/   thanks Jag

Posted in LINQ/EF | Tagged , | Leave a comment

Learning “LINQ to SQL” queries from SELECT statement: basics

Hai,   My first article on "Querying LINQ to SQL" got published here http://www.aspfree.com/c/a/.NET/Querying-LINQ-to-SQL-Basics/   It covers the following (in both VB.NET and C#):   -> fetching rows from a table using LINQ -> Column aliasing and columns of expressions … Continue reading

Posted in LINQ/EF | Tagged , | Leave a comment

Working with “LINQ to SQL Designer” using Visual Studio 2008

Hello,   My new article on "LINQ to SQL Designer" got published here http://www.aspfree.com/c/a/.NET/Introducing-LINQ-to-SQL-Designer-using-Visual-Studio-2008/   It is very similar to my previous article except that this one focuses on "LINQ to SQL Designer".   thanks Jag.

Posted in LINQ/EF | Tagged , | Leave a comment

Beginning “LINQ to SQL” using Visual Studio 2008

Hai,   My new article on "LINQ to SQL" got published here http://www.aspfree.com/c/a/.NET/Beginning-LINQ-to-SQL-Using-Visual-Studio-2008/   It covers all the following topics:   -> Developing a simple "LINQ to SQL" application without using "LINQ to SQL" designer -> Retrieve and update information … Continue reading

Posted in LINQ/EF | Tagged , | Leave a comment

TIP: Viewing the generated SQL of LINQ statements

Even though LINQ uses the familar syntax as of SQL, it is not the same SQL generated at run-time.  To view the SQL generated from LINQ, we can use "Log" property of "DataContext" in the following manner:                 Dim obj … Continue reading

Posted in LINQ/EF | Tagged , , | Leave a comment

Part 4: Learning LINQ from SQL using Visual Basic 2008 – Sub Queries

The source code for all of the following LINQ queries can be downloaded here:     http://cid-41050f68f010a662.skydrive.live.com/embedrowdetail.aspx/Public/SourceFilesForBlog/LINQ/01-LINQ-SubQueries/Solution1.zip   A simple sub-query representation using LINQ (with aggregation in sub-query): The following SQL SELECT SELECT ename FROM emp         WHERE sal = (SELECT … Continue reading

Posted in LINQ/EF | Tagged , | Leave a comment

Part 3: Learning LINQ from SQL using Visual Basic 2008 – Grouping

To execute the LINQ statements provided in this post, I suggest you to go through Part-1 (http://jagchat.spaces.live.com/blog/cns!41050F68F010A662!913.entry), where I demonstrated the same.   A simple example on GROUP..BY..operator of LINQ: The following SQL SELECT      SELECT Deptno, COUNT(*) FROM emp GROUP … Continue reading

Posted in LINQ/EF | Tagged , | Leave a comment

Part 2: Learning LINQ from SQL using Visual Basic 2008 – WHERE operator

To execute the LINQ statements provided in this post, I suggest you to go through Part-1 (http://jagchat.spaces.live.com/blog/cns!41050F68F010A662!913.entry), where I demonstrated the same.   A simple example on WHERE operator of LINQ: The following SQL SELECT      SELECT ename, sal FROM emp … Continue reading

Posted in LINQ/EF | Tagged , | 2 Comments

Part 1: Learning LINQ from SQL using Visual Basic 2008 – Selecting columns, DISTINCT, ORDER BY

For this sample, I simply created an ASP.NET 3.5 web site project (using Visual Studio 2008 beta 2) and dragged a GridView on to a web page.  Added a class "Employee.vb" to the project as following (code removed for clarity):  … Continue reading

Posted in LINQ/EF | Tagged , | Leave a comment