C #3.0 how to learn from LINQ to SQL

Source: Internet
Author: User
Tags define function

After writing more than a dozen articles on C #3.0 and LINQ to SQL, I began to look back and reflect on where I took the readers. Is it heaven? Or hell?

Experts are always dismissive of the ability to write SQL statements. I like to discuss the problem from the bottom layer. But more new users are stuck at the "will use" and "know" levels. That's what I do. I will always be a newbie. No matter when or when I reach any level, I will always be a newbie.

The biggest change in C #3.0 is not due to the introduction of LINQ. All other new features, including extension method, Lambda expression, and anonymous types, are introduced mainly for the sake of LINQ. Of course, the use of these features is not limited to LINQ. The introduction of new technologies does not limit the use of such technologies by manufacturers.

I have been engaged in C # March testing since January 3.0. I dare not say that I know every feature, not to mention that I am familiar with every feature. I only know some features. For a newbie, especially those who haven't used C #2.0, directly telling him lambda expressions will make him dizzy. Because he may not know anonymous methods. that's not to mention extension method. Is there any other way? I tried it. That is to use it first and then understand it slowly. Therefore, in the C #3.0 getting started series, we started with query expression-query expression.

In the ADO. NET + SQL era, we use ado.net to construct the data access layer. For the entities corresponding to the table, we need to write the corresponding classes by ourselves. These methods are commonly used when writing data-related applications. Because the vast majority of people will use LINQ to SQL to replace ado.net for database-related business programs. Therefore, I have abandoned other features and started to talk about them directly from the perspective of LINQ. This is mainly caused by the use of LINQ to SQL.

There is an evolutionary process for the origins of the names of LINQ to SQL. It was first called dlinq. Ms only introduces a LINQ preview. Later, LINQ was integrated into. NET Framework 3.5 from LINQ preview. The namespace of dlinq is also changed to LINQ, so the name of dlinq is adjusted accordingly, and the name is "LINQ to SQL. There are still traces of this evolution in my blog. However, the author has not come and updated its content. VS was also changed from the original version 2007 to vs2008. Now beta2is released.

The rise of a language and a technology requires a large number of people to use it, recognize its advantages, and promote it. I assume that all readers have C #1.1 language basics. In addition, this article focuses more on the applications of LINQ to SQL. Because, I believe that this is the vitality of LINQ. It is a learning method that I have always advocated. I can't write it, but I still can't. Then you can get started, learn and do it, and actually start your project using LINQ to SQL.

I don't think that Lambda expressions can be used only when you know anonymous methods. I have read some blog assertions that it takes two years for an experienced C # programmer to learn to use lambda expressions. I still want to challenge this prediction. Can it be 2 months? How about two weeks? If you have two hours, it would be better if you have two days or two minutes. The author's theory is very simple. Learning to drive a tractor doesn't have to know how the tractor works. Similarly, lambda expressions do not necessarily know how lambda expressions are implemented. Use it first. With your accumulated work experience, you can gradually understand it, understand it, and gain a deeper understanding of it. This is a cyclical process.

C #3.0 is based on this idea. Maybe, if you have a specific project, it may be better to introduce it while using LINQ. However, some items cannot be taken out at will. I am preparing a demo and hope it will help you.

PS:
C #3.0 getting started series (1)
C #3.0 getting started series (2)
C #3.0 getting started series (III)
C #3.0 getting started series (4)-Select operations
C #3.0 getting started series (V)-Where operations
C #3.0 entry series (6)-orderby operations
C #3.0 getting started series (7) -- or tool Introduction
C #3.0 getting started series (8)-groupby operations
C #3.0 getting started series (9)-groupby operations
C #3.0 getting started series (10)-Join Operations
C #3.0 getting started series (11)-in and like operations
C #3.0 getting started series (12)-lifting in lambda expressions

Advanced series of LINQ to SQL (1)-starting from ing
Advanced series of LINQ to SQL (ii) M: m relationships
LINQ to SQL advanced series (iii) cud and log
Advanced series of LINQ to SQL (4) user define function

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.