开发者

Projections in LINQ to SQL

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜