真爱无限的知识驿站

学习积累技术经验,提升自身能力

pkm的linq to Entities学习2

.Net Code

            using (testEntities TestEntity = new testEntities())
            {
                #region linq to entities 内容练习2
                #region 父子关系表查询
                /*
                var maxScorePerClass = from s in TestEntity.stuinfo
                                       group s by s.classID into s1
                                       select new
                                       {
                                           classid = s1.Key,
                                           stuinfo = from s2 in s1
                                                     where s2.score == s1.Max(p => p.score)
                                                     select s2
                                       };


<< 1 >>

Powered By Z-BlogPHP 1.7.3

Copyright 2024-2027 pukuimin Rights Reserved.
粤ICP备17100155号