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

Était-ce utile?

La 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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top