コード例 #1
0
ファイル: AddToOrgFromTag.cs プロジェクト: stevesloka/bvcms
 public static IQueryable<int> FetchPeopleIds(CMSDataContext db, int tagid)
 {
     return tagid == -1
         ? db.PeopleQueryLast().Select(pp => pp.PeopleId)
         : from t in db.TagPeople
           where t.Id == tagid
           select t.PeopleId;
 }
コード例 #2
0
 public static IQueryable<int> FetchPeopleIds(CMSDataContext db, int tagid)
 {
     return tagid == -1
         ? (from p in db.PeopleQueryLast()
            group p by p.FamilyId into ff
            select ff.First().PeopleId)
         : (from t in db.TagPeople
            where t.Id == tagid
            group t.Person by t.Person.FamilyId into ff
            select ff.First().PeopleId);
 }