O'Reilly logo

Pro LINQ: Language Integrated Query in C# 2008 by Joseph C. Rattz Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending Entity Classes with Partial Methods

One of the problems early adopting LINQ developers complained of was their inability to know what is happening inside an entity class. During the incubation period of LINQ, there was no way for a developer to know, programmatically speaking, when an entity class object's property is being changed or when the entity class itself is being created except by modifying the generated entity class code, which we all know is a no-no. Any modifications to the generated entity class code will be lost the next time that code needs to be regenerated, so that just isn't feasible. Fortunately, the engineers at Microsoft were listening.

In Chapter 2, I told you about partial methods, and this is where partial methods ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required