title: Field is required when it is not .net Core entityframeworkcore
body: <p>I generated context and model by running nuget command line</p>
  
  <pre><code>Scaffold-DbContext "Server=(LocalDb)\MSSQLLocalDB;Initial Catalog=DummyDB;
  Integrated Security=True;Connect Timeout=30;" 
  Microsoft.EntityFrameworkCore.SqlServer -outputDir Context -Context DummyContext
  </code></pre>
  
  <p>When I tried to pass without optional field "address", it complaints "address" field is required before reaching to the post function. Any idea?
  Thanks</p>
  
  <pre><code>{
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "firstName": "string",
    "age": 0
  }
  </code></pre>
  
  <p>My codes generate as following </p>
  
  <p>DummyContext.cs</p>
  
  <pre><code>using System;
  using Microsoft.EntityFrameworkCore;
  using Microsoft.EntityFrameworkCore.Metadata;
  
  namespace ProjectTemplate.Context
  {
  public partial class DummyContext : DbContext
  {
      public DummyContext()
      {
      }
  
      public DummyContext(DbContextOptions&lt;DummyContext&gt; options)
          : base(options)
      {
      }
  
      public virtual DbSet&lt;Dummys&gt; Dummys { get; set; }
  
      protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
      {
          if (!optionsBuilder.IsConfigured)
          {
              optionsBuilder.UseSqlServer("Server=(LocalDb)\\MSSQLLocalDB;Initial Catalog=DummyDB;Integrated Security=True;Connect Timeout=30;");
          }
      }
  
      protected override void OnModelCreating(ModelBuilder modelBuilder)
      {
          modelBuilder.Entity&lt;Dummys&gt;(entity =&gt;
          {
              entity.Property(e =&gt; e.Id).ValueGeneratedNever();
  
              entity.Property(e =&gt; e.Address)
                  .HasColumnName("address")
                  .HasMaxLength(200);
  
              entity.Property(e =&gt; e.Age).HasColumnName("age");
  
              entity.Property(e =&gt; e.FirstName)
                  .IsRequired()
                  .HasColumnName("firstName")
                  .HasMaxLength(50);
          });
  
          OnModelCreatingPartial(modelBuilder);
      }
  
      partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Dummys.cs</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  
  namespace ProjectTemplate.Context
  {
  public partial class Dummys
  {
      public Guid Id { get; set; }
      public string FirstName { get; set; }
      public int? Age { get; set; }
      public string Address { get; set; }
  }
  }
  </code></pre>
  
  <p>a post function for createBook</p>
  
  <pre><code>    // POST: api/Dummy
      [HttpPost]
      public async Task&lt;ActionResult&lt;Dummys&gt;&gt; Post([FromBody] Dummys dummy)
      {
          dummy.Id = Guid.NewGuid();
          using (var context = new DummyContext())
          {
              context.Dummys.Add(dummy);
              context.SaveChanges();
          }
          return dummy;
      }
  </code></pre>