Dr. Dobb's Journal - December 2008 - (Page 33) d12espo_p5db 10/13/08 9:17 AM Page 33 Develop your application with the same time-tested and robust imaging code used by Fortune 1000 companies such as and LEADTOOLS provides developers easy access to decades of expertise in developing color, grayscale, document, medical, vector and multimedia imaging code. Install LEADTOOLS to eliminate months of research and development time while maintaining high levels of quality, performance and functionality. Viewer, Image List and more Web Form Image controls Client and Server 150+ including TIFF, JPEG, JPEG XR, JPEG2000, PDF, XPS, DWG scroll, zoom, pan, brightness, window level supports 32 and 64 bit drivers auto-detect optimum driver settings for fastest scanning transforms and color conversion functions deskew, despeckle, registration and more Full Page or Zonal recognition with formatted output including PDF, DOC and TXT Detect, read and write 1D and 2D symbols including DataBar, EAN, DataMatrix, QR, PDF417 and Processing JBIG, JBIG2, ABIC, CCITT G4 and more Interactive UI for image mark-up including shapes, text, measurement, security and multimedia display and process signed/unsigned 12-16 bit, 32 bit data Viewer Framework All IOD classes and modalities (CR, CT, MR, NM, US, RF, SC, VL and more) high/low-level functions for all service classes capture, play, stream and convert DVD, MPEG, AVI, WMV, MP4, MP3, OGG, ISO and more read/write raster and text searchable creation and burn Figure 1: The T-SQL code being run as detected by the Visual Studio 2008 debugger. leveraging the partial class (and partial method) mechanism, you can modify the behavior of LINQ-to-SQL and bend it to your wishes. There are two main mechanisms of extensibility built into LINQ-to-SQL classes that relate to fine-tuning T-SQL code: • Partial methods in entity classes. • Partial methods in the data context class. A partial method in a partial class is an optional method that is declared without an implementation. The following code shows the partial methods defined for the data context class: partial void OnCreated(); partial void InsertCustomer(Customer instance); partial void UpdateCustomer(Customer instance); partial void DeleteCustomer(Customer instance); partial void InsertOrder(Order instance); partial void UpdateOrder(Order instance); partial void DeleteOrder(Order instance); A call to a partial method may exist everywhere within a partial class. At compile time, if a body for any partial methods is not found, the compiler replaces any call to a partial method with a no-op. In other words, partial methods are injection points in the body of a class for pieces of code that you want to customize. For example, the partial methods listed above let you change the way in which a customer (or an order) is inserted, updated, or deleted. If you implement any Listing Two NorthwindDataContext db = new NorthwindDataContext(); Product p1 = db.Products.Single(p => p.ProductName == "X"); Product p2 = db.Products.Single(p => p.ProductName == "Y"); Order order1 = new Order(); order1.OrderDate = DateTime.Now; order1.RequiredDate = order1.OrderDate.AddDays(7); OrderDetail item1 = new OrderDetail(); item1.ProductID = p1.ProductID; item1.Quantity = 4; order1.OrderDetails.Add(item1); OrderDetail item2 = new OrderDetail(); item2.ProductID = p2.ProductID; item2.Quantity = 1; order1.OrderDetails.Add(item2); Customer cust = db.Customers.Single(c => c.CustomerID == "ALFKI"); cust.Orders.Add(order1); db.SubmitChanges(); December 2008 l www.ddj.com l Dr. Dobb’s Journal 33 http://www.leadtools.com/dobbs http://www.leadtools.com/dobbs http://www.ddj.com
Table of Contents Feed for the Digital Edition of Dr. Dobb's Journal - December 2008 Dr. Dobb's Journal - December 2008 Contents Friday Night Fish Fry Alia Vox Developer Diaries Conversations The Man Who Sold the Sky Performance on Rails LINQ-to-SQL and T-SQL A Remote Java RMI Registry Beyond B-Trees File Descriptors and Multithreaded Programs Effective Concurrency The Agile Edge Swaine's Flames Dr. Dobb's Journal - December 2008 Dr. Dobb's Journal - December 2008 - Dr. Dobb's Journal - December 2008 (Page Cover1) Dr. Dobb's Journal - December 2008 - Dr. Dobb's Journal - December 2008 (Page Cover2) Dr. Dobb's Journal - December 2008 - Dr. Dobb's Journal - December 2008 (Page 1) Dr. Dobb's Journal - December 2008 - Dr. Dobb's Journal - December 2008 (Page 2) Dr. Dobb's Journal - December 2008 - Dr. Dobb's Journal - December 2008 (Page 3) Dr. Dobb's Journal - December 2008 - Contents (Page 4) Dr. Dobb's Journal - December 2008 - Contents (Page 5) Dr. Dobb's Journal - December 2008 - Friday Night Fish Fry (Page 6) Dr. Dobb's Journal - December 2008 - Friday Night Fish Fry (Page 7) Dr. Dobb's Journal - December 2008 - Friday Night Fish Fry (Page 8) Dr. Dobb's Journal - December 2008 - Friday Night Fish Fry (Page 9) Dr. Dobb's Journal - December 2008 - Alia Vox (Page 10) Dr. Dobb's Journal - December 2008 - Alia Vox (Page 11) Dr. Dobb's Journal - December 2008 - Developer Diaries (Page 12) Dr. Dobb's Journal - December 2008 - Developer Diaries (Page 13) Dr. Dobb's Journal - December 2008 - Conversations (Page 14) Dr. Dobb's Journal - December 2008 - Conversations (Page 15) Dr. Dobb's Journal - December 2008 - The Man Who Sold the Sky (Page 16) Dr. Dobb's Journal - December 2008 - The Man Who Sold the Sky (Page 17) Dr. Dobb's Journal - December 2008 - The Man Who Sold the Sky (Page 18) Dr. Dobb's Journal - December 2008 - The Man Who Sold the Sky (Page 19) Dr. Dobb's Journal - December 2008 - Performance on Rails (Page 20) Dr. Dobb's Journal - December 2008 - Performance on Rails (Page 21) Dr. Dobb's Journal - December 2008 - Performance on Rails (Page 22) Dr. Dobb's Journal - December 2008 - Performance on Rails (Page 23) Dr. Dobb's Journal - December 2008 - Performance on Rails (Page 24) Dr. Dobb's Journal - December 2008 - Performance on Rails (Page 25) Dr. Dobb's Journal - December 2008 - Performance on Rails (Page 26) Dr. Dobb's Journal - December 2008 - Performance on Rails (Page 27) Dr. Dobb's Journal - December 2008 - Performance on Rails (Page 28) Dr. Dobb's Journal - December 2008 - LINQ-to-SQL and T-SQL (Page 29) Dr. Dobb's Journal - December 2008 - LINQ-to-SQL and T-SQL (Page 30) Dr. Dobb's Journal - December 2008 - LINQ-to-SQL and T-SQL (Page 31) Dr. Dobb's Journal - December 2008 - LINQ-to-SQL and T-SQL (Page 32) Dr. Dobb's Journal - December 2008 - LINQ-to-SQL and T-SQL (Page 33) Dr. Dobb's Journal - December 2008 - LINQ-to-SQL and T-SQL (Page 34) Dr. Dobb's Journal - December 2008 - A Remote Java RMI Registry (Page 35) Dr. Dobb's Journal - December 2008 - A Remote Java RMI Registry (Page 36) Dr. Dobb's Journal - December 2008 - A Remote Java RMI Registry (Page 37) Dr. Dobb's Journal - December 2008 - A Remote Java RMI Registry (Page 38) Dr. Dobb's Journal - December 2008 - A Remote Java RMI Registry (Page 39) Dr. Dobb's Journal - December 2008 - Beyond B-Trees (Page 40) Dr. Dobb's Journal - December 2008 - Beyond B-Trees (Page 41) Dr. Dobb's Journal - December 2008 - File Descriptors and Multithreaded Programs (Page 42) Dr. Dobb's Journal - December 2008 - File Descriptors and Multithreaded Programs (Page 43) Dr. Dobb's Journal - December 2008 - File Descriptors and Multithreaded Programs (Page 44) Dr. Dobb's Journal - December 2008 - File Descriptors and Multithreaded Programs (Page 45) Dr. Dobb's Journal - December 2008 - Effective Concurrency (Page 46) Dr. Dobb's Journal - December 2008 - Effective Concurrency (Page 47) Dr. Dobb's Journal - December 2008 - Effective Concurrency (Page 48) Dr. Dobb's Journal - December 2008 - The Agile Edge (Page 49) Dr. Dobb's Journal - December 2008 - The Agile Edge (Page 50) Dr. Dobb's Journal - December 2008 - The Agile Edge (Page 51) Dr. Dobb's Journal - December 2008 - Swaine's Flames (Page 52) Dr. Dobb's Journal - December 2008 - Swaine's Flames (Page Cover3) Dr. Dobb's Journal - December 2008 - Swaine's Flames (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.