title: (MVC, Identity) How to Add ApplicationUser to Model?
body: <p>I want to do a Blog project in MVC. so i created a new project in VS whit ASP.NET 4.5.1 and Individual User Accounts.</p>
  
  <p>Now I'm facing exactly the same problem as mentioned in article below:</p>
  
  <p><a href="https://stackoverflow.com/questions/20925822/asp-mvc5-identity-how-to-get-current-applicationuser/22746384">ASP.NET MVC 5 - Identity. How to get current ApplicationUser</a></p>
  
  <p>But mine is a bit deeper!</p>
  
  <p>I don't know how to define a "ApplicationUser" in my Model. this is my Model:</p>
  
  <pre><code>public class Article {
      public int Id {get; set;}
      .
      .
      .
      public string AuthorId { get; set; }
      public virtual ApplicationUser Author { get; set; } //this line is the problem!
  }
  </code></pre>
  
  <p>This is my very simple Controller:</p>
  
  <pre><code>namespace Blog.Controllers
  {
      [Authorize]
      public class ArticleController : Controller
      {
          DatabaseContext db = new DatabaseContext();
  
          public ActionResult Index()
          {
              IEnumerable&lt;Article&gt; articles = db.Articles;
              return View(articles);
          }
      }
  }
  </code></pre>
  
  <p>And i always get this set of errors:</p>
  
  <pre><code>Blog.Models.IdentityUserLogin: : EntityType 'IdentityUserLogin' has no key defined. Define the key for this EntityType.
  Blog.Models.IdentityUserRole: : EntityType 'IdentityUserRole' has no key defined. Define the key for this EntityType.
  IdentityUserLogins: EntityType: EntitySet 'IdentityUserLogins' is based on type 'IdentityUserLogin' that has no keys defined.
  IdentityUserRoles: EntityType: EntitySet 'IdentityUserRoles' is based on type 'IdentityUserRole' that has no keys defined.
  </code></pre>
  
  <p>(Please note that all the 4 classes mentioned in errors above are built-in classes, i.e. they were built during creation of project.)</p>
  
  <p>What should i do?</p>