title: Should you use a partial class across projects?
body: <p>I have a class library with all my database logic.  My DAL/BLL.  </p>
  
  <p>I have a few web projects which will use the same database and classes, so I thought it was a good idea to abstract the data layer into its own project.</p>
  
  <p>However, when it comes to adding functionality to classes for certain projects I want to add methods to certain classes.</p>
  
  <p>For example, my data layer has Product and SomeItem objects:</p>
  
  <pre><code>// Data Access Layer project
  
  namespace DAL {
    public class Product { 
       //implementation here 
    }
  
    public class SomeItem {
       //implementation here 
    }
  }
  </code></pre>
  
  <p>In one project I want to add an interface that is used by different content items, so I have a class called:</p>
  
  <pre><code>// This is in Web Project
  namespace DAL {
    public partial class Product : ICustomBehaviour {
  
      #region ICustomBehaviour Implementation
         TheSharedMethod();
      #endregion
    }
  }
  </code></pre>
  
  <p><strong>Is it a good idea to write a partial class in a separate project (creating a dependency) using the <em>same</em> namespace?  If it's a bad idea, how can I get this type of functionality to work?</strong></p>
  
  <p>It doesn't seem to want to merge them at compile time, so I'm not sure what I'm doing wrong.</p>