Hey everyone,
I am currently building an ASP.NET MVC website with the Entity Framework Code First as my ORM. I am also using the repository pattern:
- Repository retrieves and adds/deletes from the data store (MS SQL Server in my case)
- Service classes filter the data and deliver it to the view
- An MVC Web Application takes care of the application logic and rendering the views
I have a
POCO User class which currently contains nothing but properties that will be mapped to table columns when EF generates the database. I also have a UsersManager class which should be self explanatory.
According to my project requirements, the User can do several things (events?) including:
- Post a comment
- Add a listing to his WatchList
- Send a private message to another user
- Bid on an auction
- ...etc
Question:
Where does the logic of the events mentioned above go? Is the User class responsible of implementing this logic, or is it the UsersManager class? Explain why please.