title: Separate ViewModel for Read, Create, and Update actions in ASP.NET MVC
body: <p>I use the same <code>ViewModel</code> in <code>ASP.NET MVC</code> projects, but for a thousand of records it seems to be better not to retrieve unused records from database. For example, assume <code>UserViewModel</code> for <strong>Read</strong>, <strong>Create</strong> and <strong>Update</strong> situations as shown below:</p>
  
  <pre><code>public class UserViewModel
  {
      public int Id { get; set; }
  
      public string Email { get; set; }
  
      public string Password { get; set; }
  
      public string ConfirmPassword { get; set; }
  
      public bool EmailConfirmed { get; set; }        
  
      public virtual int AccessFailedCount { get; set; }
  
      public virtual bool LockoutEnabled { get; set; }
  
      public virtual DateTime? LockoutEndDateUtc { get; set; }
  
      public virtual string PasswordHash { get; set; }
  
      public virtual string PhoneNumber { get; set; }
  
      public virtual bool PhoneNumberConfirmed { get; set; }
  
      public virtual string SecurityStamp { get; set; }
  
      public virtual bool TwoFactorEnabled { get; set; }
  }
  </code></pre>
  
  <p><strong><em>Read:</em></strong> When displaying the details of a record, I need to retrieve all of the properties except from password (I know I can also retrieve data without <code>ViewModel</code>, but sometimes I need to combine several views in a ViewModel and this is also similar situation).</p>
  
  <p><strong><em>Create:</em></strong> When creating a new record, I do not need to use Id, <strong>EmailConfirmed</strong>, <strong>AccessFailedCount</strong>, etc. Columns.</p>
  
  <p><strong><em>Update:</em></strong> When updating a record, I do not need to use some properties also.</p>
  
  <p>Under this scene, what is the best approach for using <code>ViewModel</code>? To create a separate <code>ViewModel</code> i.e. <strong>ReadUserViewModel</strong>, <strong>CreateUserViewModel</strong> and <strong>UpdateUserViewModel</strong> or to use the same <code>ViewModel</code> for the same group of data? Any help would be appreciated. </p>