title: Query specific table in C# Visual Studio database
body: <p>I am new to Visual Studio MVC3 and trying to connect to a database. I have my connection string in the web.config file:</p>
  
  <blockquote>
    <p>add name="con" connectionString="Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;
    User ID=myUsername;Password=myPassword;" providerName="System.Data.SqlClient"</p>
  </blockquote>
  
  <p>However, the server has multiple tables. How/where will I specify which table to use when querying the database?</p>
  
  <p>EDIT:<br>
  For example, I am looking at <a href="http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application" rel="nofollow">this example</a>. How does the application differentiate between the tables to display data? When you call  <code>return View(db.Students.ToList())</code> as in the example in the link, how does the application know to look in the student table and not in the enrollment table?</p>