title: WPF MVVM Validation using data annotation
body: <p>I am New in wpf mvvm architecture.Insert updates are working with linq to sql.I need to give the validation using data annotation.How can we provide validation using data annotation.Can any one give some good example?</p>
  
  <p>My Model is</p>
  
  <pre><code>namespace EmployeeApp.Model
  {
      public class Employee : ObservableObject
      {
          #region Constructor
          public Employee(int empId = 0, string empName = "", int age = 0)
          {
              _empId = empId;
              _empName = empName;
              _age = age;
  
          }
          #endregion
  
          #region Properties
          private int _empId = 0;
  
          public int EmpId
          {
              get { return _empId; }
              set
              {
                  _empId = value;
                  RaisePropertyChangedEvent("ID");
              }
          }
  
          private string _empName = string.Empty;
  
          public string EmpName
          {
              get { return _empName; }
              set
              {
                  _empName = value;
                  RaisePropertyChangedEvent("Name");
              }
          }
  
          private int _age = 0;
  
          public int Age
          {
              get { retuenter code heren _age; }
              set
              {
                  _age = value;
                  RaisePropertyChangedEvent("Age");
              }
          }
  
  
          #endregion
      }
      }
  </code></pre>
  
  <p>Thanks in advance.</p>