title: Debugging Entity Framework SQL statements
body: <p>I am having a weird pattern of response time when using the Entity Framework for SQL communication.</p>
  
  <p>This is from my web host:</p>
  
  <p><a href="https://i.stack.imgur.com/XQKxU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XQKxU.png" alt="enter image description here"></a></p>
  
  <p>This is from my local server: </p>
  
  <p><a href="https://i.stack.imgur.com/U90oE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/U90oE.png" alt="enter image description here"></a></p>
  
  <p>It's the increase in response time I am worried about.
  I have narrowed the problem down to one single line in code
  Nop.Data > EfRepository.cs > public void Insert(T entity) > _entities.Add(entity);
  Yes I know this very specific for the NopCommerce, but the point is really that I am looking her for help on how to debug this.</p>
  
  <p>Are there some events I can catch that display the SQL being executed?
  Or what other things can I do to find out more what is actually happening in the Entity Framework in that above command.</p>