示例#1
0
 public List <Projeto> Get()
 {
     if (this.isAdmin())
     {
         return(_service.projetoService.ListarTodos());
     }
     else
     {
         return(_service.ListarTodos(this.userId()).Select(up => up.Projeto).ToList());
     }
 }
示例#2
0
        public IEnumerable <Projeto> Get()
        {
            if (this.isAdmin())
            {
                return(_service.ListarTodos());
            }

            return(_userprojeto_service.ListarTodos(this.userId())
                   .Select(item => item.Projeto));
        }