title: ViewModels in MVC / MVVM / Separation of layers- best practices?
body: <p>I'm fairly new to the using ViewModels and I wonder, is it acceptable for a ViewModel to contain instances of domain models as properties, or should the properties of those domain models be properties of the ViewModel itself? For example, if I have a class <code>Album.cs</code></p>
  
  <pre><code>public class Album
  {
      public int AlbumId { get; set; }
      public string Title { get; set; }
      public string Price { get; set; }
      public virtual Genre Genre { get; set; }
      public virtual Artist Artist { get; set; }
  }
  </code></pre>
  
  <p>Would you typically have the ViewModel hold an instance of the <code>Album.cs</code> class, or would you have the ViewModel have properties for each of the <code>Album.cs</code> class' properties.</p>
  
  <pre><code>public class AlbumViewModel
  {
      public Album Album { get; set; }
      public IEnumerable&lt;SelectListItem&gt; Genres { get; set; }
      public IEnumerable&lt;SelectListItem&gt; Artists { get; set; }
      public int Rating { get; set; }
      // other properties specific to the View
  }
  
  
  public class AlbumViewModel
  {
      public int AlbumId { get; set; }
      public string Title { get; set; }
      public string Price { get; set; }
      public IEnumerable&lt;SelectListItem&gt; Genres { get; set; }
      public IEnumerable&lt;SelectListItem&gt; Artists { get; set; }
      public int Rating { get; set; }
      // other properties specific to the View
  }
  </code></pre>