LINQ_SQL_FYI.htm
LINQ (Language-Integrated-Query), was introduced with Visual Studio 2008, to support complex queries and support any kind of data storage.

Without complicating or repeating the descriptions available Link, let us look at SQL and LINQ side by side. At this point it would be worth of mentioning that LINQ is a step beyond standard SQL used  to query RDBMS. 

MySQL : PHP
Using PostgreSQL: PHP

In the above examples, I used a simple SQL Query "Select * from emp" , to query a table in MySQL and PostgreSQL DBMS.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace ConsoleApplication1
{
    class ObjectFacotry
    {
        public int Id { get; set; }// Properties
        public String Name { get; set; }
    }

    class Program
    {
        static void Main(string[] args)
        {
            List empdb = getEmp();
            IEnumerable query1 = from emp in empdb select emp;
            foreach(ObjectFacotry query in query1)
            {
                Console.WriteLine(query.Id + " : " + query.Name);
            }
            //Console.Write(objList);
            Console.ReadLine();
        }
        static List getEmp()
        {
            return new List
            {
               new ObjectFacotry 
               {  Id = 7369, Name ="Smith"}
            };
        }
    }
}
		
Traversing with F11 key :

At the step 3, data was fed as fields or column (equivalent), and retrieved at step 5.

Code : Used
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
//csc LINQ_SQL_FYI1.cs
namespace ConsoleApplication1
{
    class ObjectFacotry
    {
        public int Id { get; set; }// Properties
        public String Name { get; set; }
    }

    class Program
    {
        static void Main(string[] args)
        {
            List empdb = getEmp();
            IEnumerable query1 = from emp in empdb select emp;
            Console.WriteLine(" ID "+ "Ename ");
            foreach(ObjectFacotry query in query1)
            {
                Console.WriteLine(query.Id + " : " + query.Name);
            }
            //Console.Write(objList);
            Console.ReadLine();
        }
        static List getEmp()
        {
            return new List
            {
               new ObjectFacotry 
               {  Id = 7369, Name ="Smith"}
            };
        }
    }
}