Your question has already been asked, and most complete answer I think you can find here: https://stackoverflow.com/questions/6516230/is-it-ok-to-make-a-dao-class-as-singleton
Is it a good practice to share one dao accross multiple files that use it?
-
01-07-2022 - |
Question
I have an entity
User
If I want to make an operation with this entity I use
UserDao
Is this a good practice to have only one instance of this dao in whole solution shared accross the project and files whenever it is needed?
Like having this dao in a singleton?
thanks for answers
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow