public UsuarioResponse Map(Usuario request) { if (request == null) { return(null); } var usuario = new UsuarioResponse { UsuarioId = request.UsuarioId, Nome = request.Nome, Email = request.Email, DataNascimento = request.DataNascimento.ToString("yyyy-MM-dd"), Senha = request.Senha, SexoId = request.SexoId, Ativo = request.Ativo, Sexo = _sexoMapper.Map(request.Sexo) }; return(usuario); }
public async Task <IEnumerable <SexoResponse> > GetSexoAsync() { var result = await _sexoRepository.GetAsync(); return(result.Select(p => _sexoMapper.Map(p))); }