title: Should I always use AsNoTracking in N-Tier MVC App?
body: <p>In my application I have a basic architecture as shown:</p>
  
  <p><code>RepositoryMethods (DO) --&gt; BusinessEngines (DTO) --&gt; Controller (ViewModel)</code></p>
  
  <p>I like to keep all the Entity Framework / DbContext access code in one place.  My Repository methods all have the DbContext injected and are all API style as opposed to a generic repository:</p>
  
  <pre><code>Task&lt;Post&gt; GetAllPostsInCategory(int categoryId);
  </code></pre>
  
  <p>So as the entities (Domain Objects) are converted to Data Transfer Objects and then to View Models, can entity framework still track them or should I always be using <code>.AsNoTracking()</code> in every Repository method?  In dot net core I think this can be set globally am I correct?</p>