form guest in gList
join title in titList on guest.Name equals title.Name into taroup
select new{Name=guest.Name, Titles=taroup};
select new{Name=guest.Name, Titles=taroup};
不是很明白~~~这里应该是创建了一个对象~~它的属性Name=guest.Name, Titles=taroup~~~为什么这个对象还能进行
迭代运算???????在LINQ表达式中~~~form guest in gList中的“guest”~~~我不是很明白他的含义~~给我感觉有点像“gList”集合中的一个对象??????
望指点一下

解决方案 »

  1.   

    你from写错了。。
    这里的guest就是一个变量名,随便起的名字,代表你要选择的数据 
      

  2.   

    你的理解正确..这个"guest"可以自己起名
      

  3.   

    没写全:var q = 
    form guest in gList
    join title in titList on guest.Name equals title.Name into taroup
    select new{Name=guest.Name, Titles=taroup};
    上面是一对多的关系.一个guest会发布多个文章,也就是对应一组title.而这一组title就是taroup了
    最后返回新对象给q..我这个对象有一个guest的Name和这个guest所发布的所有文章
      

  4.   

    查询语法结构
    Query Operators 
     Meaning in Life  
    from, in 
      
    where 
     
    select 
     Used to select a sequence from the container. 
    join, on, equals, into 
     
    orderby, ascending, descending 
     
    group, by 
      

  5.   

    form guest in gList 
    gList 你映射的表名 可以随便起的
    guest 临时对gList对象的映射select new{Name=guest.Name, Titles=taroup};
    显示指定的列名,或者是赋值