title: Using context.Database.Log in MVC web app
body: <p>Using the guide <a href="http://blog.oneunicorn.com/2013/05/08/ef6-sql-logging-part-1-simple-logging/">here</a>, I'm trying to log the SQL generated by my MVC web application.</p>
  
  <p>The guide uses the line:</p>
  
  <pre><code>context.Database.Log = Console.Write;
  </code></pre>
  
  <p>Which obviously doesn't work with a web application.  The guide described the Log property:</p>
  
  <blockquote>
    <p>The DbContext.Database.Log property can be set to a delegate for any
    method that takes a string.</p>
  </blockquote>
  
  <p>And it's this I don't understand, delegates just confuse me. How can I use this EF6 feature?</p>