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
});
精彩评论