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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top