Exemple #1
0
 public IEnumerable <PerfilModel> Get([FromQuery] PerfilQO perfil)
 {
     try
     {
         return(PerfilService.GetComParametro(perfil));
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #2
0
        public IEnumerable <PerfilModel> GetComParametro(PerfilQO perfil)
        {
            try
            {
                if (!string.IsNullOrEmpty(perfil.NomePerfil))
                {
                    return(PerfilRepository.ListPorNomePerfil(perfil.NomePerfil));
                }
                else
                {
                    List <PerfilModel> listPerfil = new List <PerfilModel>();

                    listPerfil.Add(PerfilRepository.Find(perfil.PerfilId));

                    return(listPerfil);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }