title: Entity Framework Core - DefaultValue(true) attribute not working
body: <p>What is the code-first approach to set the default value of a database column in entity framework core?</p>
  <p><strong>Attempt #1:</strong> Using the <code>DefaultValue</code> attribute on the model doesn't seem to work</p>
  <pre><code>[DefaultValue(true)]
  public bool ShowInReports { get; set; }
  </code></pre>
  <p>After running the migration, the following code is generated by dotnet ef version 5.0.1:</p>
  <pre><code>    migrationBuilder.AddColumn&lt;bool&gt;(
          name: &quot;ShowInReports&quot;,
          table: &quot;ParametersUsed&quot;,
          nullable: false,
          defaultValue: false);
  </code></pre>
  <p>Attempt #2: trying to define the value in <code>OnModelCreating</code> doesn't recognize the function:</p>
  <pre><code>    modelBuilder.Entity&lt;TableName&gt;()
          .Property(t=&gt; t.ShowInReports)
          .HasDefaultValue(true);
  </code></pre>
  <p>Error: <code>'PropertyBuilder&lt;bool&gt;' does not contain a definition for 'HasDefaultValue' and no accessible extension method 'HasDefaultValue' accepting a first argument of type 'PropertyBuilder&lt;bool&gt;' could be found (are you missing a using directive or an assembly reference?)</code></p>