LINQ via C#

Recently I am giving a series of talk on LINQ. the name “LINQ via C#” is copied from “ CLR via C# ”, one of my favorite books. Currently part 1 – 8 are finished, and the entire series should be 10 parts. The contents are: Introducing LINQ What Is LINQ

LINQ via C# Events Posters Design

10 LINQ via C# events have been held successfully. Each event is a pure English speaking technical talk. I designed some posters for the events, with no enough time to design for each event. LINQ via C# part 4 In part 3, lambda expression of C# is introduced...

Introducing LINQ (1) What Is LINQ

[ LINQ via C# series ] This LINQ series is from my 10 parts of LINQ via C# talks . And the poster designs for the events are here . What is LINQ Here is the roadmap of .NET and C#: Date .NET Framework CLR C# IDE Introduced Features February 13th, 2002...

Introducing LINQ (2) Advancements Overview

[ LINQ via C# series ] According to MSDN : LINQ is one of Microsoft’s most exciting, powerful new development technologies. Independent to data source This sample mentioned in part 1 is working on items in a .NET array: var results = from number in source...

Understanding C# 3.0 Features (1) Automatic Property

[ LINQ via C# series ] As the fundamental of LINQ, This chapter will explain the new language features of C# 3.0, all of which are syntactic sugars. This part is about the automatic property. In C# 2.0 a property can be declared like this: public class...

Understanding C# 3.0 Features (2) Object Initializer And Collection Initializer

[ LINQ via C# series ] Take this Person type as an example: public class Person { public string Name { get ; set ; } public int Age { get ; set ; } } Object initializer In C# 2.0 we create an Person instance and initialize it like this: Person person...

Understanding C# 3.0   Features (3) Type Inference

[ LINQ via C# series ] The “var” keyword has been introduced from the beginning . It is a new language feature called type inference in C# 3.0. Local variable type inference Consider the local variable declaration and initialization: TypeName a = b; Since...

Understanding C# 3.0 Features (4) Anonymous Type

[ LINQ via C# series ] This feature provides a way to create an instance without declare the type: var mark = new { Name = "Mark" , Age = 18 }; Since the type name is unknown at this time when writing code, this is called a anonymous type. Compilation...

Understanding C# 3.0 Features (5) Extension Method

[ LINQ via C# series ] Extension method is a fancy and powerful syntactic sugar in C# 3.0. Extension methods are very important when writing functional style C# code. Define an extension method for a class When we define an extension method for a type...

Understanding C# 3.0 Features (6) Lambda Expression

[ LINQ via C# series ] Lambda expression is another powerful syntactic sugar making C# functional. In this post, “Lambda expression” simply means “C# Lambda expression”. The native concept of lambda expression will be introduced in the later lambda calculus...

Understanding C# 3.0 Features (7) Query Expression

[ LINQ via C# series ] This kind of code has been introduced again and again: var positive = from number in source where number > 0 orderby number descending select number.ToString( CultureInfo .InvariantCulture); This is called the query expression...

Understanding C# 3.0 Features (8) Partial Method

[ LINQ via C# series ] The is a very simple feature. From partial class to partial method Partial class is introduced by C# 2.0. With the partial keyword, the definition of one type is able to be divided into several files. For example, if creating a...

Understanding LINQ to Objects (1) Programming Paradigm

[ LINQ via C# series ] Declarative vs. imperative This post mentioned that LINQ introduced new programming constructs to C#. Take a look at the samples in the beginning post : int [] source = new int [] { 0, -5, 12, -54, 5, -67, 3, 6 }; List < int...

Understanding LINQ to Objects (2) Method Chaining

[ LINQ via C# series ] It is obvious the Where(), OrderBy(), Select() can be invoked fluently: int [] source = new int [] { 0, 1, -2, 3, 24, 6, 3 }; var results = source.Where(item => item > 0 && item < 10) .OrderBy(item => item) ...

Understanding LINQ to Objects (3) Query Methods

[ LINQ via C# series ] After understanding the programming paradigm and why LINQ query methods can be chaining , this post shows the details of LINQ query methods. Methods like Where(), OrderBy(), OrderByDescending(), and Select() are exhibited again...

Understanding LINQ to Objects (4) Iterator Pattern

[ LINQ via C# series ] According to Wikipedia : Iterator pattern is a design pattern in which iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation. An Iterator object encapsulates...

Understanding LINQ to Objects (5) Implementing Iterator

[ LINQ via C# series ] Iterator pattern is the core pattern of LINQ to Objects implementation. To filter, order, or project the data items of a data collection, of course the code need to go through the collection and figure out the results. The previous...

Understanding LINQ to Objects (6) Deferred Execution

[ LINQ via C# series ] One post at the beginning of this series mentioned that deferred execution is a important advancement of LINQ. The following code show how is the execution deferred: IEnumerable < int > source = Enumerable .Range(-2, 5); ...

Understanding LINQ to Objects (7) Query Methods Internals

[ LINQ via C# series ] This post explains how are the LINQ to Objects standard query methods implemented. Once again, it will be exhibited that iterator pattern is the core pattern of LINQ to Objects query. The first thing need to emphasize is, not all...

Understanding LINQ to Objects (8) The Design Of IEnumerable<T>

[ LINQ via C# series ] Currently in .NET, iterator pattern is implemented via IEnumerable<T> and IEnumerator<T> (or IEnumerable and IEnumerator): namespace System.Collections { // Represents a collection which can be iterated. public interface...

Understanding LINQ to SQL (1) Object-Relational Mapping

[ LINQ via C# series ] According to Wikipedia , Object-relational mapping is: a programming technique for converting data between incompatible type systems in relational databases and object-oriented programming languages. This is the LINQ to SQL sample...

Understanding LINQ to SQL (2) IQueryable<T>

[ LINQ via C# series ] The core of LINQ to Objects is IEnumerable<T>: Query methods are designed for IEnumerable<T> as extension methods , like Where(), Select(), etc.; Query methods are designed to be fluent, LINQ to Objects queries can be...

Understanding LINQ to SQL (3) Expression Tree

[ LINQ via C# series ] In LINQ to Objects, lamda expressions are used everywhere as anonymous method, like Where(): public static IEnumerable <TSource> Where<TSource>( this IEnumerable <TSource> source, Func <TSource, bool > predicate...

Understanding LINQ to SQL (4) Data Retrieving Via Query Methods

[ LINQ via C# series ] After understanding: object model generating from SQL Server schema query method chaining on IQueryable<T> SQL are translated from expression tree, which is required by IQueryable<T> now it is time to take a deeper look...

Understanding LINQ to SQL (5) Remote And Local Method Call

[ LINQ via C# series ] Since LINQ to SQL is translating C# methods into SQL, all the C# methods are required to make sense in SQL. According to MSDN : A local method call is one that is executed within the object model. A remote method call is one that...

Understanding LINQ to SQL (6) Working With Deferred Execution

[ LINQ via C# series ] Similar with LINQ to Objects, LINQ to SQL supports deferred execution when possible. For example: using ( NorthwindDataContext database = new NorthwindDataContext ()) { IQueryable < Category > source = database.Categories;...

Understanding LINQ to SQL (7) Data Changing

[ LINQ via C# series ] After understanding how to retrieve data with LINQ to SQL, now take a look at data change (create (insert) / update / delete). Object Identity When changing data queried by LINQ to SQL, one common confusion for LINQ to SQL beginners...

Understanding LINQ to SQL (8) Transaction

[ LINQ via C# series ] Database data Changing cannot be talked about without transactions . Implementing TRANSACTION (BEGIN / COMMIT / ROLLBACK) The previous post has shown that, when invoking SubmitChanges(), the translated SQL (INSERT / UPDATE / DELETE...

Understanding LINQ to SQL (9) Concurrent Conflict

[ LINQ via C# series ] Conflicts are very common when concurrently accessing the same data. Conflicts in concurrent data access The following code presents the concurrent conflict scenario: Action < int , Action < Category >> updateCategory...

Understanding LINQ to SQL (10) Implementing LINQ to SQL Provider

[ LINQ via C# series ] So far LINQ to SQL data CRUD (Creating / Retrieving / Updating / Deleting) has been explained. This post takes a deeper look at the internal implementation of LINQ to SQL query. The provider model Unlike IEnumerable / IEnumerable<T>...

Understanding LINQ to SQL (11) Performance

[ LINQ via C# series ] LINQ to SQL has a lot of great features like strong typing query compilation deferred execution declarative paradigm etc., which are very productive. Of course, these cannot be free, and one price is the performance. O/R mapping...

LINQ via C# 系列文章相关推荐

  1. Scott的ASP.net MVC框架系列文章之四:处理表单数据(2)

    前几周我发表了一系列文章介绍我们正在研究的ASP.NET MVC框架.ASP.NET MVC框架为你提供了一种新的开发Web应用程序的途径,这种途径可以让应用程序变得更加层次清晰,而且更加有利于对代码 ...

  2. LINQ体验系列文章导航

    LINQ体验系列文章导航 LINQ推荐资源 推荐一个大家学习和交流LINQ的地方,就是博客园的LINQ专题和LINQ交流小组.LINQ专题中整理了有关LINQ方方面面的入门.进阶.深入的文章:学习中遇 ...

  3. 经典博文--各系列文章

    稳扎稳打Silverlight Silverlight 1.0 稳扎稳打Silverlight(1) - 1.0实例之电子表 稳扎稳打Silverlight(2) - 1.0实例之支持录音和回放的钢琴 ...

  4. LINQ之路系列博客后记

    缘起 今年3月,我换了工作单位.后来多次收到公司的新人培训邮件,不过对此我并不感冒,说实话并不喜欢这种活动.印象中,新人培训无非是唠叨些公司的规章制度.侃述一下公司的光辉历史还有灿烂的未来发展等等.规 ...

  5. 步步为营VS 2008 + .NET 3.5系列文章索引

    介绍 步步为营VS 2008 + .NET 3.5系列文章索引:VS 2008新特性.C# 3.0新特性.LINQ查询操作符.DLINQ(LINQ to SQL).XLINQ(LINQ to XML) ...

  6. 如何使用graphpad做柱形图_系列文章 如何使用PaddleDetection做一个完整项目(三)...

    系列文章 如何使用PaddleDetection做一个完整项目(三) 该文章是PaddleDetection的完结篇,请参考之前两篇文章 https://zhuanlan.zhihu.com/p/10 ...

  7. Windows Mobile 开发系列文章收藏 - Windows Mobile 6.x

    收集整理一些Windows Mobile 6.x开发相关文章, 文章及相关代码大部分搜集自网络,版权属于原作者! 智能手机      手机词汇      研发手机基本流程 WAP协议分析(1)     ...

  8. .Net并行编程系列文章导航

    .Net4.0并行编程系列文章如下: 多核时代 .NET Framework 4 中的并行编程9---线程安全集合类 多核时代 .NET Framework 4 中的并行编程8---任务的同步 多核时 ...

  9. 博客园技术系列文章目录

    目录1.5版-2015 05 05 如果大家觉得不全,或者有更好的可以评论里面留言啊,后续还会有2.0  3.0  n.0版本 关于大型网站的思考--夏森 http://www.cnblogs.com ...

最新文章

  1. TensorFlow 输出tensor数据
  2. IDEA 连接MySQL数据库
  3. 通过Zookeeper动态感知服务器上下线[案例]
  4. FEC之异或运算应用
  5. Spring Boot-场景启动器
  6. Warning: mysqli_connect()_php链接MySQL8.0_异常
  7. typescript的命名空间
  8. Token注解防止表单的重复提交
  9. Kewail-邮件短信接口的基础教程
  10. nginx rtmp HLS直播
  11. 关于Unable to load annotation processor factory 的故障
  12. Linux IPC udp/ip socket 编程
  13. js实现敏感词过滤算法
  14. java实现pdf预览和下载
  15. 适用于 Windows 10 的触摸板手势
  16. M个苹果放在N个盘子里,有多少种不同的放法
  17. window media player 内部应用程序出错
  18. allegro 走线切换层_PCB 18种特殊走线的画法与技巧
  19. ​LeetCode刷题实战375:猜数字大小 II
  20. ETABS结构指标查看

热门文章

  1. centos执行-查看,复制,删除-命令的脚本
  2. ES6中的promise、async、await用法详解
  3. InnoDB redo log格式-物理log
  4. LoadRunner监控mysql利器-SiteScope(转)
  5. chrome打不开12306
  6. 页面动态显示程序执行结果-append
  7. BUX让你轻松赚美元
  8. 【面试精选】关于大型网站系统架构你不得不懂的10个问题
  9. [原][osg]osgconv浅析
  10. C++Primer ch4笔记