title: Business logic layer in ASP.NET MVC - Architecture
body: <p>I am fairly new to ASP.NET MVC. I am really confused about the architecture of my project. Let me explain my confusion to you guys:</p>
  
  <p>In my project I have three parts which are know to all of us. These are: controllers, models and views. </p>
  
  <p>Controllers reside inside <code>Controllers</code> folder, views go inside <code>Views</code> folder and models are inside <code>Models</code> folder.</p>
  
  <p>As we all know there are two types of models: data model and business model. The data model has all the data types to be used in the project and the business models do have additional logic related to the project. In addition to it there is going to be a data layer of the application which talks to the database.</p>
  
  <p>I am going to create a class library project for this data layer which will talk to database. Also, <code>Models</code> folder of my MVC project is going to have data models only and I am going to create a different library for business model classes as well. </p>
  
  <p>Now the problem I am facing is this:</p>
  
  <p>Lets say the name of my MVC project is <code>MVCProj</code>, name of data layer project is <code>DataProj</code> and that of business layer project is <code>BusinessProj</code>.
  If I define the data types inside <code>Models</code> folder of <code>MVCProj</code>, I have to include  its reference in both <code>BusinessProj</code> and <code>DataProj</code> projects. Also, I then have to use <code>BusinesProj</code> classes in my <code>MVCProj</code>. Thus I have to add reference of <code>BusinessProj</code> in <code>MVCProj</code> which results in circular dependency. </p>
  
  <p>I am not sure if the architecture I am envisioning is correct or not. Please help me sort it out.</p>