标签:ted pre asc sel derby erb asp style object
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
int[] values = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 };
var value = from v in values
where v < 3 || v > 7
orderby v descending
select v;
Response.Write("查询结果:<br>");
foreach (var i in value)
{
Response.Write(i + "<br>");
}
}
}
在LINO查询表达式中,orderby 升序用ascending关键字,降序用descending关键字
asp.net LINQ数据访问技术from where select order by子句
标签:ted pre asc sel derby erb asp style object
原文地址:http://www.cnblogs.com/luxiaoyao/p/6194275.html