title: Building DAL. Using EDM (from database)
body: <p>I have to develop an lob application that works in windows (wpf) but should be deployed in two flavors: </p>
  
  <ul>
  <li>With a local database (same computer)</li>
  <li>With a remote database (in the same network)</li>
  </ul>
  
  <p>I'll use Entity Data Model generated from a database (dbcontext, EF 4.0) (VS2012, sql server express 2012)</p>
  
  <p>I want to develop a unique Data Access Layer which the UI will be bound to, and it will take the data from the dbcontext directly (local database) or from a WCF Service that exposes the data from a dbcontext (remote database)</p>
  
  <p><img src="https://i.stack.imgur.com/zyQeM.jpg" alt="enter image description here"></p>
  
  <p>I don't know where to start, I need guidance, examples, I know that it depends on the nature of the application, but some example, article, would be of great help. I don't find an example that's similar to my needs</p>
  
  <p>I guess that I better use a DI Framework, but I want to focus on the DAL first.</p>