How to get the length of Property? <p>I am using Entity Framework code First Approach so I have the mapping model like shown below.Like this I have 40 models Now I want to know the length of column such as BC_ID as shown above programmatically.How can I get max column Length ?I think we can do it using Reflection class but do not know exactly how to do it.I am using Entity Framework 5.0</p> <pre><code>public class BusinessContactMap : EntityTypeConfiguration&lt;BusinessContact&gt; { public BusinessContactMap() { // Primary Key this.HasKey(t =&gt; t.BC_ID); // Properties this.Property(t =&gt; t.BC_ID) .IsRequired() .HasMaxLength(64); this.Property(t =&gt; t.BC_FirstName) .HasMaxLength(64); this.Property(t =&gt; t.BC_LastName) .HasMaxLength(64); this.Property(t =&gt; t.BC_Mobile) .HasMaxLength(64); this.Property(t =&gt; t.BC_Office) .HasMaxLength(64); this.Property(t =&gt; t.BC_Mail) .HasMaxLength(64); // Table &amp; Column Mappings this.ToTable("BusinessContacts"); this.Property(t =&gt; t.BC_ID).HasColumnName("BC_ID"); this.Property(t =&gt; t.BC_FirstName).HasColumnName("BC_FirstName"); this.Property(t =&gt; t.BC_LastName).HasColumnName("BC_LastName"); this.Property(t =&gt; t.BC_Mobile).HasColumnName("BC_Mobile"); this.Property(t =&gt; t.BC_Office).HasColumnName("BC_Office"); this.Property(t =&gt; t.BC_Mail).HasColumnName("BC_Mail"); this.Property(t =&gt; t.Record_Instance).HasColumnName("Record_Instance"); this.Property(t =&gt;t.Record_LastModified).HasColumnName("Record_LastModified"); } } </code></pre>