public IEnumerable <SupervisorDto> ObterPorDreENomeSupervisor(string supervisorNome, string dreId) { var supervisoresEol = servicoEOL.ObterSupervisoresPorDre(dreId); if (string.IsNullOrEmpty(supervisorNome)) { return(supervisoresEol?.Select(a => new SupervisorDto() { SupervisorId = a.CodigoRF, SupervisorNome = a.NomeServidor })); } else { return(from a in supervisoresEol where a.NomeServidor.ToLower().Contains(supervisorNome.ToLower()) select new SupervisorDto() { SupervisorId = a.CodigoRF, SupervisorNome = a.NomeServidor }); } }