title: Partial class on a model when Entity Framework is in separate library
body: <p>I am not sure if this is the correct way to go, if so, please advise otherwise.</p>
  
  <p>This is an ASP.Net MVC 4 site using EF 5.x</p>
  
  <p>Suppose you have your Entity Framework in a class library on it's own. 
  Code Generation Item has now generated all of your Models (the xxx.tt section of your EF mode) </p>
  
  <p>This project is then added/referenced in the development of a site.</p>
  
  <p>You can now access the data via the EF.</p>
  
  <p>Now - in the site project I want to create a partial class of one of my EF models, for example "Users", with an additional property that isn't in the DB.</p>
  
  <p>In the past on a web forms project when the EF was part of the project and not a reference I would simply create the partial class and all would be good; my "Users" would now have a bunch of other stuff in it that wasn't database related but needed on the "User".</p>
  
  <p>I can't seem to get this to work in this MVC project where the EF is in a separate project.</p>
  
  <p>I have tried doing this for example:</p>
  
  <pre><code> using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using MyTestEntity.Entity;
  
  namespace MyTestMVCSite.Models
  {
      public partial class Email
      {       
          public string OtherEmail {
              get { return "me@myEmail.com"; }
          }       
      }
  }
  </code></pre>
  
  <p>I have also tried inheriting the EF models class, like this:</p>
  
  <pre><code>public partial class Email : MyTestEntity.Entity.Email
  {       
      public string OtherEmail {
          get { return "me@myEmail.com"; }
      }       
  }
  </code></pre>
  
  <p>Nothing I seem to be doing gives me access to "OtherEmail"</p>
  
  <p>What I actually want to be able to do is create a partial class for some of my models and then have this partial class implement an interface so i can inject an instance of this interface into another object rather than overloading.</p>
  
  <p>Am i talking crazy nonsense?</p>