title: Persistance Layer between Data and Business layer?
body: <p>For a school project i have to make a movie streaming platform, i decided to develop this with the .net core MVC framework.</p>
  <p>Currently my layered architecture looks like this:</p>
  <ul>
  <li><strong>User Interface Layer (MVC)</strong></li>
  <li><strong>Business Layer:</strong>
  <ul>
  <li>IMove.cs</li>
  <li>Movie.cs</li>
  <li>IMovieCollection.cs</li>
  <li>MovieCollection.cs</li>
  </ul>
  </li>
  <li><strong>Contract Layer (For my DTO)</strong></li>
  <li><strong>Data Layer</strong>
  <ul>
  <li>IMovieRepository.cs</li>
  <li>MovieRepository.cs</li>
  </ul>
  </li>
  </ul>
  <p>The <code>MovieRepository.cs</code> contains all my CRUD operations, so in this class i am getting all the movies with  the <code>GetAll()</code> method and this is where my problem comes into play. Since i cannot have a reference from my <code>Business Layer</code> to my <code>Data Layer</code> because this will cause a circular dependency, there is no way i can get the list with movies that my <code>GetAll()</code> method returns. I am still pretty new to the multi-tier architecture so i do not really know if its good practice to add another layer between my <code>Business Layer</code> and <code>Data Layer</code> where i put my repositories with my CRUD operations. Maybe a Persistance Layer?</p>
  <p>I hope someone can tell me what the best way is to fix this problem and why.</p>