title: Select Clause In LINQ Query
body: <p>Can Anyone Tell Me that: 
  How Many Types of <code>Select</code> Clause available in <code>LINQ</code> Query and How it affect on Performance as <code>Select</code> Varies?</p>
  
  <p>Examples I Found :</p>
  
  <p><strong>1. That using New Class To Get the Objects from Tables</strong></p>
  
  <pre><code>class DogInformation {
     public string Name {get;set;}
     public string BreedName {get;set;}
  }
  
  var result = (from a in new DataContext().Dogs                 
                select new DogInformation { a.Name, a.BreedName }).ToList();
  </code></pre>
  
  <p><strong>2. Using Anonymous Type</strong></p>
  
  <pre><code>var result = from d in db.Dogs
                   join b in db.Breeds on d.BreedId equals b.BreedId
                   select new
                          {
                              Name = d.Name,
                              BreedName = b.BreedName
                          };
      return result.ToList();
  </code></pre>
  
  <p><strong>3. Another I Found is</strong></p>
  
  <pre><code>var result = (from d in db.Dogs
               join b in db.Breeds on d.BreedId equals b.BreedId
               select new
                      {
                          Name = d.Name,
                          BreedName = b.BreedName
                      }).ToList()
                        .Select(x=&gt; 
                            new Dog{
                                Name = x.Name,
                                BreedName = x.BreedName,
                            }).ToList();
  return result;
  </code></pre>