title: ASP.NET MVC Business Logic in Domain Model vs Service Layer
body: <p>I have been reading about where to put business logic in ASP.NET MVC Project for a while and I still can't get clear on some things.</p>
  
  <p>1 - <strong>Domain models</strong>. What are these really? In my Model folder I have only a bunch of classes corresponding to my database. I am using EF code first. I assume these are my domain models.</p>
  
  <p>2 - <strong>Service Layer</strong>. <a href="https://stackoverflow.com/questions/6341724/where-should-i-put-my-controller-business-logic-in-mvc3">This answer</a> suggests a service layer and I think this makes perfect sense. I had decided to go with this one. However, <a href="http://martinfowler.com/bliki/AnemicDomainModel.html" rel="noreferrer">Martin Fowler's "Anemic Domain Models"</a> article messed up my mind.</p>
  
  <p>I am not really sure how can I add logic to my domain models.</p>
  
  <p>I have gone through many business logic-related questions and each of them proposes either 1 or 2. What I don't understand is how I can implement the first one. Adding methods to entity classes (domain models for me) does not make sense at all. And why is the second approach considered bad?</p>