title: How Can I Add Attributes To Model Class Based On Some Conditions
body: <p>I want to add attributes to model class properties based on some conditions</p>
  
  <p>example:</p>
  
  <p>Suppose the following EmployeeModel Class:</p>
  
  <pre><code>public class EmployeeModel
  {
      public int EmployeeId { get; set; }
  
      [Required]
      public string EmployeeName { get; set; }
  
  }
  </code></pre>
  
  <p>I want to add the Required attribute on EmployeeName Based on Some Condition.</p>
  
  <p>How can i implement that?</p>