Hello guys.

The other day I was developing an application and I created an Employee class to store and retrieve information about the employees in a database.

I declared all the properties, events and methods inside the class, even the data access methods within the class itself. But somehow this doesn't feel right, maybe it's just me because I'm starting to learn all the trades about OOP.

Now my question is, what do you guys think it's better, to include the data access method in a dedicated data class? or maybe it's okay to include the data access methods inside the class itself?

Discuss please.