var d = from b in xedm.ServerInfo
where b.ServerClass == intID
select new
{
ServerTitle = b.ServerTitle,
ServerPrice = b.ServerPrice,
ServerContent = b.ServerContent,
ServerPic = "~/" + b.ServerPic
};
请教一下 上面的如何改成 下面的写法 select()里面要怎么写啊
var d = xedm.ServerInfo.Where(c => c.ServerClass == intID).Select(xxx);
Select(b=> new
{
ServerTitle = b.ServerTitle,
ServerPrice = b.ServerPrice,
ServerContent = b.ServerContent,
ServerPic = "~/" + b.ServerPic
});
可以 谢谢哈
var d = xedm.ServerInfo.Where(c => c.ServerClass == intID).Select(new {ServerTitle = b.ServerTitle,
ServerPrice = b.ServerPrice,
ServerContent = b.ServerContent,
ServerPic = "~/" + b.ServerPic});
谢谢哈