public VoluntarioDTO Procurar(Guid id) { if (id == Guid.Empty) { throw new ApplicationException("Id não informado"); } Voluntario voluntario = voluntarioRepositorio.Selecionar(id); return(VoluntarioAdapter.ParaDTO(voluntario)); }
public Guid Alterar(VoluntarioDTO voluntario) { Voluntario voluntarioItem = VoluntarioAdapter.ParaDomain(voluntario); if (string.IsNullOrEmpty(voluntario.Nome)) { throw new ApplicationException("Nome não informado"); } voluntarioRepositorio.Alterar(voluntarioItem); return(voluntarioItem.Id); }
public List <VoluntarioDTO> SelecionarTodos() { return(VoluntarioAdapter.ListParaDTO(voluntarioRepositorio.SelecionarTodos())); }