I have my class Service
called GrupoService
, in it are most actions that refer to Grupo
.
Crud(Inserir,Alterar,Excluir,Listar)
The only dependency I have on my class so far is GrupoRepository
. You also have in it methods to insert, change, delete, delete.
So basically I do
public Grupo Inserir(Grupo model)
{
return grupoRepository.Inserir(model);
}
But my group contains Itens
, what is the correct way to inject Item
into my GrupoService
class?
Injecting ItemRepository
along with GrupoRepository
, or I put ItemService
?