Controller, Service, Repository
之前太拘泥於一個Controller就要對單一的Service,
和一個Service要對單一的Repository,
導致我的邏輯很難寫。
Controller應該根據要用哪個服務決定使用哪個Service,
再由Service處理商業邏輯。
4種Repository常見的錯誤
4 Common Mistakes with the Repository Pattern
別在Repository內做save,
不然有可能造成資料不統一,
目前我的架構有這個問題,
隱性的程式債R,未來要修。