title: Data Annotations for MVC4
body: <p>The problem is, i want to implement data-annotation in POCCO Enitites But after "edmx update" all me validation is removed, for doing it, i do R&amp;D for below example but not getting successful. I shared with all of you my senerio, please someone answer it.</p>
  
  <h2>POCCO Entity</h2>
  
  <pre><code>namespace FGSMVC
  {
      using System;
      using System.Collections.Generic;
  
      public partial class DeclaredBill
      {
          public DeclaredBill()
          {
              this.DeclaredBillReciepts = new HashSet&lt;DeclaredBillReciept&gt;();
          }
  
          public string DocNo { get; set; }
          public string BCCode { get; set; }
          public string BillNo { get; set; }
          public Nullable&lt;System.DateTime&gt; BillDate { get; set; }
          public string PONumber { get; set; }
          public string CustomerCode { get; set; }
          public Nullable&lt;double&gt; Amount { get; set; }
          public bool IsPaid { get; set; }
          public bool IsActual { get; set; }
  
          public virtual BusinessConcern BusinessConcern { get; set; }
          public virtual ICollection&lt;DeclaredBillReciept&gt; DeclaredBillReciepts { get; set; }
          public virtual PartyDetail PartyDetail { get; set; }
      }
  }
  </code></pre>
  
  <h2>MY Model Class</h2>
  
  <pre><code>namespace FGSMVC.Models
  {
      [MetadataType(typeof(DeclaredBillModel))]
      public partial class DeclaredBill
      {
      }
  
      public class DeclaredBillModel
      {
  
          [Display(Name = "Doc No")]
          public string DocNo;
  
          [Display(Name = "Business Concern")]
          public string BCCode;
  
          [Display(Name = "Bill #")]
          public string BillNo;
  
          [Display(Name = "Bill Date")]
          public Nullable&lt;System.DateTime&gt; BillDate;
  
          [Display(Name = "PO #")]
          public string PONumber;
  
          [Display(Name = "Customer")]
          public string CustomerCode;
  
          [Display(Name = "Amount")]
          public Nullable&lt;double&gt; Amount;
  
          [Display(Name = "Paid")]
          public bool IsPaid;
  
          [Display(Name = "Acutal")]
          public bool IsActual;
      }
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/4rwEP.png" alt="As result is given below"></p>
  
  <hr>
  
  <p>Please some one solve my problem, i am in trouble,
  In my point of view label must be shown as Display name data-annotation</p>