title: Custom DataAnnotations attribute to Fluent-API
body: <p>I'm porting aproject from EF6 to EF7 Core and I'm converting all the classes with DataAnnotationtions to FluentAPI.</p>
  
  <p>In the project I have extensive use of Custom DataAnnotatiotions Attributes. I'm in the need to convert:</p>
  
  <pre><code>    [Required, MaxLength(Consts.DbLength.OriginName)]
      [FrontendEditable]
      public string OriginName { get; set; }
  </code></pre>
  
  <p>where [FrontendEditable] is something like:</p>
  
  <pre><code>    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Enum, AllowMultiple = false, Inherited = false)]
  public class FrontendEditableAttribute : Attribute
  {
      public FrontendEditableAttribute()
      {
      }
  </code></pre>
  
  <p>I would like to convert this to Fluent API in the modelBuilder like:</p>
  
  <pre><code>            modelBuilder.Entity&lt;Origin&gt;(e =&gt;
          {
              e.Property(oN =&gt; oN.OriginName).IsRequired();
              e.Property(oN =&gt; oN.OriginName).HasColumnType("NVARCHAR");
              e.Property(oN =&gt; oN.OriginName).HasMaxLength(50);
          });
  </code></pre>
  
  <p>This in order to have only some of the fields of the db editable from the FrontEnd and some locked.</p>
  
  <p>Any suggestion will be appreciated.</p>