title: Should I inherit models in my view model or use a property for the model
body: <p>I have a handful of email templates and in each template I have a header and footer that all share the same info.</p>
  
  <p>The header and footer are represented by <code>EmailModel.cs</code></p>
  
  <pre><code>public class EmailModel
  {
      public string CompanyName { get { return ConfigurationManager.AppSettings["CompanyName"]; } }
      public string PhoneNumber { get { return ConfigurationManager.AppSettings["PhoneNumber"]; } }
      public string FacebookUrl { get { return ConfigurationManager.AppSettings["FacebookUrl"]; } }
      public string TwitterUrl { get { return ConfigurationManager.AppSettings["TwitterUrl"]; } }
      public string YouTubeUrl { get { return ConfigurationManager.AppSettings["YouTubeUrl"]; } }
      //Additional methods for sending these templates as emails
  }
  </code></pre>
  
  <p>Now for a specific email template I have a view model.<code>NewSignUpEmailViewModel.cs</code></p>
  
  <p>Should I do this:</p>
  
  <pre><code>public class NewSignUpEmailViewModel : EmailModel
  {
      public string FirstName { get; set; }
      public string CompanyName { get; set; }
      public string UserName { get; set; }
      public Guid UserId { get; set; }
  }
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>public class NewSignUpEmailViewModel
  {
      public EmailModel Email {get; set;}
      public string FirstName { get; set; }
      public string CompanyName { get; set; }
      public string UserName { get; set; }
      public Guid UserId { get; set; }
  }
  </code></pre>
  
  <p>I just used email as an example, is there pros/cons to each?</p>
  
  <p>The only con I can see is that in some cases you will run into duplicate property name issue.</p>