title: is a namespace but is used like a 'type'
body: <p>UPDATE</p>
  
  <p>I've created the solution again.</p>
  
  <pre><code>File &gt; New &gt; Project &gt; VisualC# &gt; Console Application
  
  Name : teststudent
  Solution name : teststudent
  </code></pre>
  
  <p>Then from solution exploer I clicked on teststudent</p>
  
  <pre><code>Add &gt; New Item &gt; ADO.Net Entity Data Model &gt; Generate from database
  </code></pre>
  
  <p>New connection :</p>
  
  <pre><code>save entity connection settings in App.Config as :
  
  teststudententities
  </code></pre>
  
  <p>Which version of Entity Framework do you want to use?</p>
  
  <pre><code>6.0
  </code></pre>
  
  <p>Then I checked all tables.</p>
  
  <pre><code>Model Namespace:
  teststudentModel
  </code></pre>
  
  <p>UPDATE ENDS</p>
  
  <p>I'm trying to create a query to show all the records in a database table named students in Visual Studio 2013.
  studentdb is the name of my database. I have established a connection to my SQL Server database. I can see the tables from the model in solution explorer. When I execute I get one build error :</p>
  
  <pre><code>'studentdb' is a 'namespace' but is used like a 'type'
  </code></pre>
  
  <p>the program.cs file :</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
      namespace studentdb
      {
          class Program
          {
              static void Main(string[] args)
              {
                  Query1();
              }
              private static void Query1()
              {
                  using (var context = new studentdb())
                  {
                      var students = from studentdetails in context.students select studentdetails;
                      Console.WriteLine(" Query All students");
                      foreach (var student in students)
                      {
                          Console.WriteLine("{0} {1}", student.studentid, student.surname);
                      }
                      Console.Write("Press enter to exit"); Console.ReadLine();
                  }
              }
          }
      }
  </code></pre>