示例#1
0
        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));
        }
示例#2
0
        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);
        }
示例#3
0
 public List <VoluntarioDTO> SelecionarTodos()
 {
     return(VoluntarioAdapter.ListParaDTO(voluntarioRepositorio.SelecionarTodos()));
 }