首页 > 其他 > 详细

week 7

时间:2015-04-22 21:57:49      阅读:248      评论:0      收藏:0      [点我收藏+]

deferred query

foreach() is where query is executed

data changes between executions,the result is different.

ToList() ToArray()

cache the data

List<Customer> cache = result.ToList<Customer>();

join query group aggregation sort

LinQ like SQL

one join two on [join condition]

only inner join
one & two all meets condition

join condition on
join c2 on
join c3 on


sort

orderby someproperty descending
ascending by default

orderby p,
Q descenging

select{new p,q}
anonymous types

mthod-based query

IEnumerable<Customer> r= c.where(c=>c.f=="")
.select(c=>c);

var result == auto

public static string R(this string s){}
sealed string
if you want to add method,have to be this way
can only access public member
can‘t override extant method

orderby
thenbydescending

orderbydescending
orderby


XML data consumption
JSON

DOM document object model

xml .save()

@->attribute
XPath directory

XML serialization
deserialization

load in memory

code serialize into XML(convert

Xmlattribute
XmlIgnore throw away

week 7

原文:http://www.cnblogs.com/itria/p/4448711.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!