title: How to correctly use and reference Entity Framework Core in another project?
body: <p>So I am building a REST API in .Net core with the following architecture and I'm wondering how to reference Entity Framework Core.</p>
  
  <p><a href="https://i.stack.imgur.com/uxOAY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uxOAY.png" alt="enter image description here"></a></p>
  
  <p>These are three projects, referencing each other the way it's shown on the image. All the queries are stored in DAL (Data Layer), so this is where I defined DbContext. </p>
  
  <p>But at the same time, I also need to add DbContext to the ConfigureServices on WebAPI Startup (<code>services.AddDbContext&lt;MyDBContext&gt;();</code>). </p>
  
  <p>So the main issue is, is that I cannot access DbContext in WebAPI, because WebAPI doesn't directly reference DAL.</p>
  
  <p>I would appreciate very much any tips, suggestions or workarounds, that wouldn't impact the architecture in any major ways.</p>