title: Liskov and Open-Closed principle violation using templates selectors
body: <p>I have a WPF MVVM and ASP MVC applications that show information about students and teachers.
  WPF app gets and saves information about students and teachers from the web service and display it in the list.
  Both students and teachers has first name, last name and age.
  Each student has also GPA (grade point average).
  Each teacher has also photo.
  The same list of students and teachers needs to be displayed in ASP MVC app.</p>
  
  <p>So in my implementation I have AbstractPersonDto, StudentDto and TeacherDto.
  I have the service:</p>
  
  <pre><code>interface IService
  {
     IList&lt;AbstractPersonDto&gt; GetAllPersons();
     void SaveAllPersons(IList&lt;AbstractPersonDto&gt; persons);
  }
  </code></pre>
  
  <p>I have also view models: AbstractPersonViewModel, StudentViewModel, TeacherViewModel in WPF and 3 more in ASP app.</p>
  
  <p><strong>The first question is: Does mapping from <code>IList&lt;AbstractPersonDto&gt;</code> to <code>IList&lt;AbstractPersonViewModel&gt;</code> violates Open-Closed and Liskov principles?</strong></p>
  
  <p>In my views in WPF and ASP MVC I use DataTemplate and DisplayFor to select appropriate template and partial view respectively.</p>
  
  <p><strong>So the second question is: Using this templates selectors also violates Open-Closed and Liskov principles or not?</strong></p>
  
  <p><strong>UPDATE 1:</strong>
  Based on comments I think I need to clarify my question:
  If I use Automapper (i.e.) it will do something like "is" or type comparison behind the scenes. Or not? Also My MainViewModel contains references to List and my View through DataTemplate iterates over this list behind the scences and choose appropriate template (somethink like "is" operator also). Does it mean that it will breaks this principles? When I change something in Dto I should change my view models also (cascade effect).</p>