title: Is calling service from controller a violation of MVC?
body: <p>I have seen many code references online they use services directly in the Controller.</p>
  
  <pre><code>public class PersonController : Controller
  {
     public ActionResult Index(int personId)
     {
         Person personDataModel = null;
         using(var service = new Personservice())
         {
            personDataModel = service.GetPerson(personId);
         }
  
         var personVM = MapPersonDataModelToViewModel(personDataModel);
  
         return View("Index",personVM);
     }
  }
  </code></pre>
  
  <p>As per <a href="https://msdn.microsoft.com/en-us/library/dd381412(v=vs.108).aspx" rel="nofollow">MSDN</a>, <strong><em>Controllers</em></strong> are the components that handle user interaction, work with the <strong><em>model</em></strong>, and ultimately select a <strong><em>view</em></strong> to render that displays UI.</p>
  
  <p>Where is the mention of <strong>Service</strong>? 
  I know people talking about Service layer pattern or SOA architecture. But still is this a <strong><em>violation</em></strong>. A <strong><em>violation for convenience</em></strong>?</p>
  
  <p><em>For some reason, if I want to do away with services. Then I'll end up changing the controller. And have to build my model. <strong>Instead I'm suppose to change only the Model.</em></strong></p>
  
  <p>I feel Model should have the intelligence to serve the request from Controller either by calling external service or by itself.</p>
  
  <pre><code>public class PersonController : Controller
  {
     public ActionResult Index(int personId)
     {
         var personVM = PersonModel.GetPerson(personId);
  
         return View("Index",personVM);
     }
  }
  
  public class PersonModel
  {
     public PersonVM GetPerson(int personId)
     {
        Person personDataModel = null;
         //Can either do this
         using(var service = new Personservice())
         {
            personDataModel = service.GetPerson(personId);
         }
  
         //Or can do this
         personDataModel = GetPersonDataModel(personId);
  
        var personVM = MapPersonDataModelToViewModel(personDataModel);
  
        return personVM;
     }
  }
  </code></pre>
  
  <p>I know PersonModel needs re-factoring but that's not the point.</p>
  
  <p><strong><em>UPDATE:</em></strong></p>
  
  <p><strong><em>When I mean Model, I'm not referring to MODEL(class with properties) that we pass to View. I mean the classes in the folder Model.</em></strong></p>
  
  <p>As per <a href="https://msdn.microsoft.com/en-us/library/dd381412(v=vs.108).aspx" rel="nofollow">MSDN</a>, Models: Model objects are the parts of the application that implement the logic for the application's data domain. Often, model objects retrieve and store model state in a database.</p>
  
  <p>I assume from above that class objects in the folder Model should have the logic to conduct CRUD operations.</p>
  
  <p>Am I missing something. Please share your valuable thoughts.</p>