title: sql query with entity framework
body: <p>How can I use sql query, in sql language, if I used entity framework to make the connection?
  I understood from this <a href="https://stackoverflow.com/questions/3962541/how-to-run-sql-queries-on-ef">post</a> that ObjectContext.ExecuteStoreQuery won't help because it works only with some queries (not 1:1 to sql language). </p>
  
  <p>The other option mentioned there is to use ObjectContext.Connection and write "classic" ADO.NET code from there, but I just can't figure out how.</p>
  
  <p>Can someone please write a very simple code example how can I perform a simple query like      </p>
  
  <pre><code>select MAX(customer_id) from Customers 
  </code></pre>
  
  <p>with the entity framework? I know that Linq-To-Sql exist, but I prefer to use sql language, it looks simpler to me and I am more familiar with it.</p>