title: Is it a good practice to add methods to the POCOs or to create separate class to update the values of the POCOs?
body: <p>Is it a good practice to add methods to the POCOs or to create separate class to update the values of the POCOs in case we need that?</p>
  
  <p>For example,</p>
  
  <pre><code>public class ForUser
  {
      [Required]
      public int Depratment { get; set; }
  
      public List&lt;SelectListItem&gt; DepartmentsList { get; set; }
  
      [Required]
      public int Role { get; set; }
  
      [Required]
      [StringLength(200, MinimumLength = 3, ErrorMessage = "Length Of The First Name Should  Be More Than Three Letters")]
      public string FirstName { get; set; }
  
      [StringLength(200, MinimumLength = 3, ErrorMessage = "Length Of The Mid Name Should  Be More Than Three Letters")]
      public string MidName { get; set; }
  
      [Required]
      [StringLength(200, MinimumLength = 3, ErrorMessage = "Length Of The Last Name Should  Be More Than Three Letters")]
      public string LastName { get; set; }
  
      [Required]
      [EmailAddress(ErrorMessage = "Invalid Email Address")]
      public string Email { get; set; }
  
      [StringLength(14, MinimumLength = 10 , ErrorMessage = "Length Of The Mid Name Should  Be More Than Nine Letters and Less than fourteen Letters")]
      [RegularExpression(@"^[+]?[0-9]*", ErrorMessage="Phone Number is not correct")]
      public string PhoneNumber { get; set; }
  
      [Required]
      public string Password { get; set; }
  
  
      public int UserId { get; set; }
      public int Company { get; set; }
      public int Country { get; set; }
      public List&lt;SelectListItem&gt; Roles { get; set; }
  }
  </code></pre>
  
  <p>I use it just to hold the data to update the <code>model entity</code> or to return data to the view. Sometimes I need to update some properties before I send the <code>object</code> to the view, like the list called <code>Roles</code> in the above example, so I am wondering about if I should add the methods to the <code>POCO</code> class or is it better to create a class to update the properties?</p>