摘要: 这个引起我的思考:public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source,Func<TSource, bool> predicate)这个this 参数怎样去解释?Func<TSource, bool>这个怎样解释?所以看了一下,this是C#3.0新特性之扩展方法。Func<T, TResult> 委托,封装一个具有一个参数并返回 TResult 参数指定的类型值的方法public delegate TResul 阅读全文
posted @ 2010-07-12 15:56 kntao 阅读(195) 评论(0) 推荐(0)
摘要: 概要集中:Connection 是由系统管理的,由一个pool提供,一般不会引发问题,但是及时close仍然是好习惯Transaction和sqlreader是我们必须自己管理的资源,必须保持对称Transaction beginCommit/rollbackReader open-> close并且要考虑异常的处理,就是有异常时也要保证资源被清理对reader 用using()对 transcation 用 TryCatchFinal—可选详解:SQLConnection的运用线程池技术开发Pooling参数用来说明在连接到数据源时,是否使用连接池,默认是True。当该值为True 时 阅读全文
posted @ 2010-07-12 15:08 kntao 阅读(393) 评论(0) 推荐(0)