首页 > 代码库 > linq 中执行方法

linq 中执行方法

  Database1Entities db = new Database1Entities();        protected void Page_Load(object sender, EventArgs e)        {            var ddd = from a in db.Table.ToList()                      let ad = Get(a.Name)                      select new                      {                          n = ad[0],                          nn = ad[1]                      };            GridView1.DataSource = ddd;            GridView1.DataBind();        }        public string[] Get(string aaa)        {            return new string[] { "1", "2" };        }

简单 看下就够了!!

linq 中执行方法