title: Entity Framework CodeFirst - To decorate or not to decorate
body: <p>When doing the CodeFirst approach, there are two ways to declare keys and related tables.</p>
  
  <pre><code>public class Person
  {
      [Key]
      public int Id { get; set; }
  }
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>protected override void OnModelCreating(DbModelBuilder modelBuilder)
  {
      base.OnModelCreating(modelBuilder);
  
      modelBuilder.Entity&lt;Person&gt;().HasKey(e =&gt; e.Id);
  }
  </code></pre>
  
  <p>Is this a matter of preference or does it make sense to use one over the other?  What should be used in a fresh project?</p>
  
  <p>Update: I will have around 8 entities each with around 1-4 relations and I want to allow cascade delete.</p>