title: How to use ASP.Net core ModelMetadata attribute
body: <pre><code>[Table("LegalEntity")]
  [ModelMetadataType(typeof(LegalEntityMeta))]
  public class LegalEntity : Entity&lt;long&gt;
  {
  }
  
  public class LegalEntityMeta
  {
      [JsonProperty(PropertyName = "LegalEntityId")]
      public long Id { get; set; }
  
      [JsonProperty(PropertyName = "LegalEntityName")]
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>In the Startup.cs  ....</p>
  
  <pre><code>        services
              .AddCors(options =&gt;
              {
                  options.AddPolicy("CorsPolicy",
                      builder =&gt; builder.AllowAnyOrigin()
                          .AllowAnyMethod()
                          .AllowAnyHeader()
                          .AllowCredentials());
              })
              .AddAutoMapper(typeof(Startup))
              .AddMvcCore()
              .AddJsonFormatters()
              .AddApiExplorer();
  </code></pre>
  
  <p>My expectation is to see json with attributes legalEntityId and legalEntityName yet the json produced has id and name as attributes.
  Can someone pleas help me with how to change the json attributes?
  Thanks
  Anand</p>