I didn't count the number of lines for the whole sample, but it's not very many. What is interetsing is that the example goes from a console client, through a service, to a SQL Server database with very modest effort. The upshot is you get to focus on the problem space and the enhancements to the .NET framework do a lot of the heavy lifting for you.

Note

Updates are supported by sending the Customer back to the service, attaching it to the DataContext, and calling SaveChanges. For roundtrip examples, stay tuned for future articles or pick up a copy of my book LINQ Unleashed for C#. The book is self-explanatory, so VB programmers should be able to decipher the C# code.

Summary

In this article, you touched up generics, extension methods, interfaces, services, LINQ to SQL, SQL Server, and distributed programming but the technical effort on the programmer's part is relatively modest.

Ten years ago, to do the same thing might have taken a week of effort. In .NET 3.5, more of the plumbing is handled by the framework and that's a very good thing.

About the Author

Paul Kimmel is the VB Today columnist for www.codeguru.com and has written several books on object-oriented programming and .NET. Check out his upcoming book LINQ Unleashed for C#; preorder your copy today at Amazon.com. Paul Kimmel is an Application Architect for EDS. You may contact him for technology questions at pkimmel@softconcepts.com.