2
Hello, I am with a doubt when I will take the data of an SQL query, there is the possibility to pull by list and by Entity, which is would be the "most correct" or the usability of each?
public List<Usuario> buscarTodos(Usuario mod){...}
public Usuario pesquisarUsuario(Usuario mod) {...}
I believe it is self-explanatory. There are times when you need to seek only one result from your table
public Usuario pesquisarUsuario(Usuario mod) {...}
. And there are times you need to seek more than one.public List<Usuario> buscarTodos(Usuario mod){...}
– Julian
I believe the answer lies in the name of methods.
– ramaral
Difference between List and Return in Entity !! It wouldn’t be [ Difference between Return List or Entity ]
– Marco Souza