I have an ASP.NET MVC 2 application with some complex business rules, and I'm trying to decide where to put the specific logic.
Logic arises when creating records, based on certain fields of this record, you need to create other records.
I am currently using a repository template with ORM, and the easiest place to put this logic in my repository class is, but I feel like this is a pretty weak spot where there are important rules, I would put it directly into my partial model classes, which have my checks and metadata, but then I need to call methods in my controller or repository, and this can increase too much implementation knowledge for these layers.
What are your best practice tips for me?
Thank!
source
share