11---LINQ和lamda表达式
//Students //.Where (u=>(u.SAddress=="南阳")) // //Students //.Select(e=>(new {e.SName,e.SAddress})) // // //from s in Students //where s.SName=="孔明" //select new {s.SName,s.SAddress} // //Students //.Where (e=>(e.SName=="孔明")) //.Select(e=>(new {e.SName,e.SAddress})) //Students //.Where(e=>(e.SName.Length<5&&e.SID<5)) //.OrderByDescending (e=>e.SID) //.Select (e=>new {e.SName,e.SAddress}) //from s in Students //where s.SName.Length<5 && s.SAddress=="南阳" //select new {s.SName,s.SAddress}
浙公网安备 33010602011771号