bxcodec / go-clean-arch

Go (Golang) Clean Architecture based on Reading Uncle Bob's Clean Architecture
MIT License
9.06k stars 1.19k forks source link

Transaction #27

Closed zczc521 closed 5 years ago

zczc521 commented 5 years ago

db object in Repository , In userCase how do i use transaction?

agungdwiprasetyo commented 5 years ago

maybe you can use as I made here: https://github.com/agungdwiprasetyo/agungdpcms/blob/master/src/resume/usecase/usecase_impl.go#L77

bxcodec commented 5 years ago

Refer to this thread #11

eddiearc commented 1 year ago

maybe you can use as I made here: https://github.com/agungdwiprasetyo/agungdpcms/blob/master/src/resume/usecase/usecase_impl.go#L77

your code display usecases depend on Repo struct and it handle *gorm.DB, i think it not follow clean-arch rules?