From time to time I am facing with this issue and could not come up with final decision.
For example I have a User class. Is there any "recommended" way to create this object in database? For example;
User user = new User();
user.name = "John";
user.lastname = "Doe";
user.CreateNewUser();
vs
User user = new User();
user.name = "John";
user.lastname = "Doe";
User.CreateNewUser(user);
which one would be preferred way and why? Or does it depend on design pattern that project follows?