开发者

Projections in LINQ to SQL

开发者 https://www.devze.com 2023-02-06 19:27 出处:网络
I have a challenge touse Select new Normally we do var record = from s in db.Setti开发者_开发百科ngs

I have a challenge to use Select new

Normally we do

var record = from s in db.Setti开发者_开发百科ngs
             select new
             {
                 myID = s.ID,
                 customName = s.PkGuid
             };

But we can't do Select new if I have like:

CacheHelper.Settings().Select(a => ???????)

Any one?!

Thanks :)


You made me uncertain for 30ms!

var record = CacheHelper.Settings().Select(a => new {
             myID = a.ID,
             customName = a.PkGuid
         });
0

精彩评论

暂无评论...
验证码 换一张
取 消