Showing posts with label LINQ to XSD. Show all posts
Showing posts with label LINQ to XSD. Show all posts

Friday, January 23, 2009

“Professional ADO.NET 3.5 with LINQ and the Entity Framework” Is in Stock at Amazon

Amazon lists my latest book for WROX/Wiley, Professional ADO.NET 3.5 with LINQ and the Entity Framework, as “In Stock” although it was originally scheduled for availability on 2/3/2009.

Thanks to Julie Lerman for the heads-up; her Programming Entity Framework book goes to the printer today for availability on 2/2/2009.

Good news! I didn’t expect the book to be available until mid-February.

Julie writes: “Dave Sceppa's book, Programming the Microsoft ADO.NET Entity Framework, still says ‘Dec 10, 2008’ although Amazon lists it as ‘not yet released’ so I'm not sure what's up with that.”

Microsoft Press says Dave’s book is scheduled to be published on 2/24/2009.

This earlier Professional ADO.NET 3.5 with LINQ and the Entity Framework: Table of Contents post of 11/8/2008 contains a chapter-level TOC.

Saturday, November 08, 2008

Professional ADO.NET 3.5 with LINQ and the Entity Framework: Table of Contents

Following is the final table of contents for Professional ADO.NET 3.5 with LINQ and the Entity Framework from Wiley, which will be published in January or February 2009:

  Introduction
Part I   Getting a Grip on ADO.NET 3.5
Chapter 1   Taking a New Approach to Data Access in ADO.NET 3.5
Part II   Introducing Language Integrated Query
    Introduction to Part II
Chapter 2   Understanding LINQ Architecture and Implementation
Chapter 3   Executing LINQ Query Expressions with LINQ to Objects
Chapter 4   Working with Advanced Query Operators and Expressions
Part III   Applying Domain-Specific LINQ Implementations
    Introduction to Part III
Chapter 5   Using LINQ to SQL and the LinqDataSource
Chapter 6   Querying DataTables with LINQ to DataSets
Chapter 7   Manipulating Documents with LINQ to XML
Chapter 8   Exploring Third-Party and Emerging LINQ Implementations
Part IV   Introducing the ADO.NET Entity Framework
    Introduction to Part IV
Chapter   9   Raising the Level of Data Abstraction with the Entity Data Model
Chapter 10   Defining Conceptual, Mapping, and Storage Layers
Chapter 11   Introducing Entity SQL
Part V   Implementing the ADO.NET Entity Framework
    Introduction to Part V
Chapter 12   Taking Advantage of Object Services and LINQ to Entities
Chapter 13   Updating Entities and Complex Types
Chapter 14   Binding Data Controls to the ObjectContext
Chapter 15   Using the Entity Framework As a Data Source

I’ll be reviewing final page layout during the next week or two. I estimate the final page count will be close to 650 (not 550) pages.

Sunday, September 21, 2008

LINQ and Entity Framework Posts for 9/15/2008+

Note: This post is updated daily or more frequently, depending on the availability of new articles.

•••• Updated 9/20/2008 and 9/21/2008 Additions EF, Astoria, LINQ to Objects, SSDS, etc. 
••• Updated 9/19/2008 8:30 AM PDT Additions LINQ to SQL, SSDS
•• Updated 9/18/2008 8:30 AM PDT Additions SSDS
• Updated 9/17/2008 9:30 AM PDT Additions

Entity Framework and Entity Data Model (EF/EDM)

•••• Roger Jennings demonstrates Huagati System’s Huagati DBML/EDMX Tools for solving EF v1’s EntitySet pluralization issue (below) in his Singularizing EntityType and Pluralizing EntitySet Names with the Huagati DBML/EDMX Tools post of 9/21/2008.

•••• Roger Jennings complains about arbitrary and capricious renaming conventions for EF EntitySets in his Forcing Gratuitious Pluralization of EF EntitySet Names Was a Very Bad Decision post of 9/20/2008.

• Julie Lerman correctly defines niladic as “having no arguments” in her EDM Stored Procedures - what the heck is niladic? post of 9/17/2008. Niladic, monadic, and dyadic functions have 0, 1, and 2 arguments, respectively. SQL Server uses the term niladic to refer to system functions, such as @@identity or @@error, which is probably where the Data Programmability group came across it. I recall use of the term in conjunction with APL programming in the late 1970s.

• Matthieu Mezil reports in his TPT with designer can generate errors 3034 or 3021 post of 9/17/2008 that the EDM Designer has problems with a pair of scenarios for the Table per Type inheritance model.

Beth Massi uses Entity Framework as the data source for her Editing Tabular Data in WPF - Building a WPF Grid post of 9/15/2008. Beth explains how the WPF ListView and BindingListCollectionView combine to create an editable WinFoms DataGridView clone.

It’s unfortunate that there’s no drag-and-drop wizardry to generate a codeless WPF project. You must write all the XAML yourself (or copy it from Beth’s post.) Alternatively, you can download the code for this and a previous post, Editing Tabular Data in WPF Using the Winforms DataGridView, from the Editing Tabular Data in WPF item on MSDN Code Gallery.

LINQ to SQL

••• Jim Wooley’s Enabling intellisense for LINQ to SQL XML Mapping files post of 9/18/2008 explains how to obtain and install the LinqToSqlMapping.xsd schema file to support the xmlns="http://schemas.microsoft.com/linqtosql/mapping/2007" namespace if it’s missing from your installation of VS 2008 SP1’s \Program Files\Microsoft Visual Studio 9.0\Xml\Schema folder.

This problem was reported in a Microsoft Connect bug report, which was acknowledged by Microsoft as a known bug. However, it wasn’t missing from my installation.

Damien Guard released the latest update to his LINQ to SQL template for Visual Studio 2008 on 9/14/2008. Damien says:

If you want to customize the LINQ to SQL code generation phase in your project without additional tool dependencies this could be what you’re looking for. The template has been improved since publication with fixes for column mapping defaults, enum parsing and now generates stored procedure wrapper methods.

This Text Template Transformation Toolkit (T4) version offers the following new features:

    • Inheritance - generates subclasses with all properties and code mappings.
    • VB.NET - CSharpDataContext.tt is joined by a VB.NET emitting VBNetDataContext.tt.
    • DataContract SP1 – additional mode to emit SP1-compatible DataContract serialization via Roger Jennings.
    • Composite keys – both as the primary key and as a foreign key in an association.
    • Type attributes – the data context and entity types can now be sealed or abstract as well as public, private, protected, internal or protected internal.
    • Associations – prevents foreign key values changing once the object association is made and updates parent side of one-to-many associations.
    • Stored procedures – generates the method wrappers complete with parameters etc.

 ••• Damien added in a message and blog update of 9/18/2008 that the version current as of 9/19/2008 has “full stored procedure support which actually works with concurrency checking (unlike SqlMetal’s which silently fails.)

LinqMaster’s How to Speed Up LINQ to Sql With Compiled Queries post of 9/15/2008 reminds us that compiling LIQ to SQL queries speeds their execution, as Rico Mariani discussed in his famous quintet of posts on the same topic.

LINQ to Objects, LINQ to XML, et al.

•••• Damon Wilder Carr delivers LINQ to GAC in his Linq to Gac : Use Linq to Power Query your Gac via this C# Bridge to Fusion team domain.dot.net post of 9/20/2008 to “get LINQ access to the GAC with no fuss.”

•••• John Papa describes a LINQ to Objects query that mashes items from several different feeds together (from an ObservableCollection<SyndicationFeed> type), and sorts them by date in his LINQ to RSS/ATOM (Kind of) post of 9/20/2008. John says:

Its pretty basic LINQ, but when combined with the way cool SyndicationFeed and SyndicationItem classes, I think its pretty darn awesome.

I agree; it nicely demonstrates the ubiquitous nature of LINQ queries.

•• Ken Getz’s recent “Advanced Basic” columns for MSDN Magazine provided yet more coverage of LINQ Enumerables:

  1. The LINQ Enumerable Class, Part 1 (July 2008) was “a quick tour through half of the methods in the Enumerable class.”
  2. The LINQ Enumerable Class, Part 2 (September 2008) “digs into the System.Linq.Enumerable class and shows readers how to perform some magic data operations using System.Linq.Enumerable.”

Is there any indication of when readers will say enough to LINQ to Objects rehashes? However, Ken’s are better than most.

• Eric White observes in his Congratulations to a Couple of Cool People post of 9/16/2007 that “the strongly typed XML programming API of version 2 of the Open XML SDK was very much inspired and influenced by LINQ to XSD,” but “[s]o far, LINQ to XSD hasn't become a supported product.”

It’s time for the Data Programmability group to move LINQ to XSD out of hibernation as an alpha product and support it!

Paul Stovell reports on his progress in simplifying Bindable LINQ by removing multi-treaded operation and substituting synchronous dispatchers in Bindable LINQ: Threading of 9/16/2008.

Bart De Smet’s strangely named Who ever said LINQ predicates need to be Boolean-valued? post of 9/14/2008 is a paean to LINQ’s flexibility that covers these topics:

  • The LINQ provider spectrum: Completely local to completely remotable
  • LINQ as a language pattern: “Just like foreach, lock, using, etc are patterns on top of other stuff (IEnumerable, Monitor, IDisposable, etc).”
  • A different view on predicates: Where as a filtering operator
  • Taking it across the border: IQueryable (or something like it)
  • Staged migration of query languages: LDAP’s ~= operator, CAML’s DateRangesOverlap() method
  • Conclusion: Six ways to write LINQ-aware APIs

ADO.NET Data Services (Astoria)

•••• Keith Pijanowski’s My talks on REST and S+S at VSLive New York 2008 post includes links to his “RESTful Services with Windows Communication Foundation” presentations a VSLive! New York. It also has links to download Nikhil’s Web Development Helper, which “provides a set of tools and utilities for the Web developer, esp[ecially] Ajax and ASP.NET developers,” and links to Rob Bagley’s 10-part REST in WCF blog series.

•••• Mike Taulty posts sample code from his REMIX UK sessions on Silverlight and WPF in his REMIX UK - "No Silverlight Application is an Island" Code post of 9/20/2008:

  1. Interacting with the HTML DOM and Javascript. Project download.
  2. Interacting with the local machine via the file dialog and Isolated Storage. Project download.
  3. Interacting with a SOAP based web service. Project download.
  4. Interacting with a RESTful web service. Project download ( note, there's some small bits of SQL to run to make this one work - in a sub-folder called SQL ). Note also you'll need the updated Silverlight client bits for ADO.NET Data Services.
  5. Interacting with RSS/ATOM. Project download ( note, I skipped by this one yesterday as I was running out of time ).
  6. Interacting with Sockets. Project download.

•• Richard Blewett’s three-part “Why REST Web Services?” article on the rejuvenated Developer Fusion site analyzes the trade-offs between SOAP and REST SaaS applications:

  1. What's wrong with SOAP
  2. What is REST?
  3. Is REST perfect?

• Daniel Pratt reports that the RTM version of Astoria with Entity Framework as the data source doesn’t support navigation properties on derived types in his Navigation properties on derived types message of 8/24/2008 in the ADO.NET Data Services (Pre-Release) forum. Microsoft’s Pratik Patel says:

[T]his didn't make it for the V1 timeframe. We really wanted to support this so that users can use inheritance in the entity model. This is one of the most important features we are targetting for V2. V1 just went out, so it will be some time before we do a beta/ctp for the next release.

Thanks to Matthieu Mezil for the 9/17/2008 heads up on that message.

ASP.NET Dynamic Data (DD)

•••• Matt Berseth now has links to live demos of his five DD demonstration projects on his Dynamic Data Demos Now Available post of 9/21/2008/. Most of the demos have substantial customization applied.

• Rick Anderson of the ASP.NET User Education (UE) group has posted a detailed analysis of the Differences When Working with the ADO.NET Entity Framework to LINQ to SQL with ASP.NET Dynamic Data (ANDD). This post is a must-read for developers considering using EF instead of LINQ to SQL as the data source for ANDD. (LINQ to SQL was the only data source for early ANDD versions.)

Some highlights:

  • Many-to-many relationships don’t support navigation; a relation table is required.
  • Complex types aren’t supported.
  • ANDD doesn’t detect auto-generated (int identity or rowguid) primary keys; a partial class for the Insert page with a Scaffold value of false for the primary key field is required
  • ListView controls require special treatment of foreign key fields

This post hasn’t received the attention it deserves.

Matt Berseth substitutes the Yahoo! User Interface (YUI) JavaScript library’s DataTable and DataSource controls for DD’s DataGrid and EntityDataSource or SqlDataSource controls in his Dynamic Data - Experimenting with YUI's DataTable and DataSource Controls post of 9/15/2008.

Steve Naughton supplements his early July FileImage_Edit FieldTemplat posts with Dynamic Data: Part 3-FileUpload FieldTemplates of 9/15/200, which let you:

  • Upload a file to a specified folder.
  • Download the said file once uploaded.
  • Display an image for the file.
  • Control the download capability via attributes and user Roles.
  • Handle errors such as wrong file type or when file is missing from upload folder.

SQL Server Data Services (SSDS)

•••• Keith Pijanowski, Microsoft strategy platform advisor, outlined the high-level architecture strategy in a session entitled "Navigating the Software Plus Services Landscape" to Kathleen Richards, senior editor of Redmond Developer News and Application Development Trends as reported in her VSLive! NY: A Glimpse of .NET Framework in the Cloud story of 9/10/2008.

His My talks on REST and S+S at VSLive New York 2008 post of 9/9/2008 include links to his “Navigating the Software plus Services Landscape” and “RESTful Services with Windows Communication Foundation.” (See the related Astoria item.)

••• Soumitra Sengupta’s SSDS at PDC 2008 post of 8/18/2008 describes the four SSDS presentations at PDC 2008:

  1. Microsoft SQL Server: Data-Driven Applications from Device to Cloud - Dave Campbell
  2. A Lap around SQL Server Data Services - Soumitra Sengupta
  3. Under the Hood: Building SQL Server Data Services - Istvan Cseri and Gopal Kakivaya
  4. SQL Server Data Services: Futures - Patric McElroy

Soumitra also recommends these related sessions:

  1. Microsoft Sync Framework: Enterprise Data in the Cloud and on Devices - Liam Cavanagh
  2. Microsoft Sync Framework Advances - Lev Novik
  3. Developing Applications Using Data Services - Mike Flasko
  4. Entity Framework Futures - Tim Mallalieu
  5. Project "Velocity": A First Look - Murali Krishnaprasad
  6. A Lap around Building Block Services - John Shewchuk
  7. Architecture of the Building Block Services - Dennis Pilarinos, John Shewchuk

•• Werner Vogels, Amazon.com’s CTO, announced in his Expanding the Cloud post of 9/18/2008 that Amazon Web Services’ S3 service will be complemented by a new content delivery network (CDN) later this year. Amazon’s CDN will feature a “global network of edge locations this new service [that] can deliver popular data stored in Amazon S3 to customers around the globe through local access.”

While not competing directly with SSDS or other current Windows Live services, AWS’ expanded service repertoire indicates that Amazon plans to maintain its current #1 position in cloud computing. For more background and details, read Jeff Bar's post on the AWS weblog and Om Malik’s Amazon Launches Content Delivery Network. Rivals, Watch Out! article of 9/18/2008.

•• Alex Iskold, founder/CEO of AdaptiveBlue, says (quoting an anonymous Amazon evangelist):

AWS now handles 50k requests per second from 400,000 developers. Bandwidth from AWS is now almost double the bandwidth of Amazon.com’s retail operations.

•• Niraj Nagrani has scheduled his TechNet Webcast: SQL Server Data Services Launch (Level 200) for 11/14/2008. See SQL Server Data Services to Launch On or Before 11/14/2008? of 9/18/2008 for a screen capture in case the SSDS folks change their mind on the “release,” which I think is the public beta.

•• Jeffrey Schwartz’s Reaching For The Clouds With SSDS Microsoft gives cloud-based repository lots of air play (excuse the pun) post of 9/15/2008 to the Redmond Developer New blog reviews Microsoft account architect Jim Williams’ SQL Server Data Services: An Introduction and Overview of Microsoft's Cloud Storage Service session about SSDS at VSLive! New York last week. Jeffrey’s article has a link to my SQL Server Data Services: Data storage in the cloud Tech Brief.

I’ve heard of building architects, software architects, and application architects but “account architect” is a new one for me. I wonder what pay grade Microsoft assigns to “account architects” and whether they have an industry association? Association of Account Architects? American Institute of Account Architects?

• Amitabh Srivastava, Microsoft VP of Cloud, Infrastructure, & Services, is interviewed on Channel9 for 9:02 about the cloud services sessions at PDC 2008. Here’s the deck:

In a very special edition, the VP of CIS, joins Mike and Jennifer to talk about what his team will be revealing at PDC (well, he can’t really say that much yet – you’ll just have to go to the PDC to find out his news).  An  11 year Microsoft veteran, Amitabh joined Microsoft in 1997 working in our Research group.  Now he works for Ray Ozzie, and the PDC is the coming out party for his team and what they’ve been working on in the Services space.

Much of the nine minutes was devoted to a discussion of utility computing (a la SSDS.)

• John Papa foresees cloud services as a major application for the next version of Silverlight in his Cloud Services are Important to Silverlight’s Future. John says:

I’m looking beyond this release a what might be in the next release. I think we’ll see a lot of graphical improvements, but where I see a great opportunity for growth is in the area of building more expansive cloud services support with Silverlight. Security, improved REST service interoperability, PUT, DELETE, increasing the HTTP stack, and other features that make working with cloud services would greatly enhance development in Silverlight and give it a big edge over competition. Who knows what [else] we’ll see, but from everything I hear from readers, there is a lot of interest in this area.

Roger Jennings wrote the SQL Server Data Services: Data storage in the cloud Tech Brief for the 9/15/2008 edition of Redmond Developer News. Click here to view the simple SSDS diagram.

For a deeper look into SSDS’s workings and updated test harness sample code, check out the fully illustrated Updated SQL Server Data Services (SSDS) Test Harness: Northwind REST and SOAP Uploads of 7/27/2008.

SQL Server Compact (SSCE) 3.5 and Sync Services

The Sync Framework Team announced v1.0 Service Pack 1 of Sync Services for ADO.NET on Devices (Windows Mobile) on 9/16/2008. This download lets you synchronize between a server database and a SQL Compact database on a Windows Mobile 5 or 6 device.

This announcement makes it more important than ever for SSDS to align with ADO.NET Data Services architecture in advance of the release of “Astoria Off-Line.”

Visual Studio 2008 Service Pack 1 (General)

No new posts as of 9/17/2008 9:30 AM PDT 

Miscellaneous (MVC, WPF, WCF, Silverlight, etc.)

•••• Mike Taulty attempts in his Silverlight and WPF - Sharing Library Projects post of 9/21/2008 to create the following releases with common source code:

  • Desktop Debug
  • Desktop Release
  • Silverlight Debug
  • Silverlight Release

“but loading this project into Visual Studio looks to confuse Visual Studio.” Mike is looking for help from MSBuild gurus.

• The Windows Live Writer Team has released an update to the WLW beta that appears more stable than the original WLW Wave 3 Technical Preview that I’ve been using the the past few weeks. The update is still a beta, but this version has received a very attractive visual upgrade.

Click here for the installer that lets you select the Live applications to install: Messenger v9, Windows Live Movie Maker, Mail with Calendar synchronisation, Writer, Photo Gallery, Family Safety and the Outlook Connector. You can’t deselect updates to the WLW and Live Mail betas.

• Rob Connery finally finished his MVC Storefront Part 21: Order Manager and Personalization video segment on 9/16/2008. Rob says:

The first part is devoted to expanding the Order management pipeline bits - Charging, Shipping, and Cancellation. I expand on Windows Workflow and also create a separate code-based pipeline for those who don't want to use WWF. The second part is all about plugging in User Tracking and what it means to plant data that you can mine later.

• Aaron Skonnard’s announces in his The "Endpoint" show on Channel9 post of 9/16/2008 that his WCF Endpoint screencasts have moved to Channel 9. Following are links to the four current episodes:

WCF and WF posts alternate in four-week cycles. The next WCF post is due

Dan Wahlin shows you how to use Silverlight 2 User Input Controls for data input in his “Wahlin on .NET” column for the September 2008 issue of Visual Studio Magazine.

Jeffrey Palermo is interviewed by Bob Familiar about Architectural Concerns for the ASP.NET MVC Framework at Tech*Ed 2008 Developer. Here’s the deck:

Join Jeffrey Palermo for a boots-on-the-ground talk about how to fit ASP.NET MVC into your Web application architecture while avoiding some of the pitfalls common with Web Forms. We'll cover the following in depth: designing for testability, loose coupling, separation of concerns, automated testing of controller actions, dependency injection, and leveraging IoC container support from the MvcContrib open source project.

Sunday, August 31, 2008

LINQ and Entity Framework Posts for 8/25/2008+

Note: This post is updated daily or more frequently, depending on the availability of new articles.

•••• Update 8/30/2008 to 9/1/2008: Additions and updates
••• Update 8/29/2008: Additions
•• Update 8/28/2008: Additions
• Update 8/27/2008: Additions
Update 8/26/2008: SSDS is back on line as of 13:30 PDT

Entity Framework (EF)

•••• Julie Lerman’s EF Business Classes in ASP.NET Apps - Don't pass that query around! post of 8/31/2008 recommends that developers using EF

Return Results, not Queries from the Business classes

by forcing iteration by invoking the ToList(), FirstOrDefault() or similar method, or looping through a foreach structure.

•••• Shawn Wildermuth dispels The Fable of the Perfect ORM on 8/30/2008. He points out that at least the following factors enter into the selection of the object-relational mapping tool:

  • Functional Requirements
  • System Requirements
  • Skill-set of the Development Team
  • Business Factors
  • Time-to-Market
  • Business Culture
  • Lifetime of Project
  • Volatility of Schema

Shawn goes on to give examples of criteria for using LINQ to SQL, NHibernate, LLBLGen Pro, or Entity Framework.

•••• Julie Lerman’s More on Foreign Keys in EF post of 8/30/2008 describes a partial class to return the scalar value of a foreign key from an EntityReference. Foreign key values are useful for specifying associations with dropdown lists. (LINQ to SQL delivers foreign key values by default.)

•••• Matthieu Mezil demonstrates in his EF and WPF post of 8/29/2008 part of the code required for a WPF master-details application that enables using a combo box to choose the master for the details window.

••• Julie Lerman finds EntityKeys are case sensitive in her 8/29/2008 post. Improperly cased keys and property names return

  • The member with identity 'NWentities' does not exist in the metadata collection.
    Parameter name: 'identity'
  • The required entry 'customerID' was not found in the provided input. This entry is required by the key fields defined on type 'NWModel.Customer'

exceptions, respectively.

••• Matthieu Mezil strikes again on the table-per-hierarchy inheritance model in TPH Is Not NULL mapped on a relationship of 8/29/2008.

••• Maíra Wenzel's Handling Null Database Values Using Data Source Controls tip of 8/28/2008 notes that:

This topic Handling Null Database Values Using Data Source Controls has now been updated on MSDN to fix the sample based on various customer feedback. You can still see the old version here, in case you're curious to compare both versions.

Her post provides the details on what changed.

•• Matthieu Mezil continues his investigation of strangenesses in EF’s processing of a simple query in his LINQ To Entities: stranger and stranger post of 8/28/2008.

•• Jacob Proffitt’s Changing Table Names in an OR/M post of 8/27/2008 explains how to change EF and LINQ to SQL table names to suit a particular naming convention in both O/RMs’ XML mapping files. Jacob finds changing table names in EF is more difficult than LINQ to SQL.

•• Tim Mallalieu partially answered my Availability of Minutes of First "Advisory Committee" Meeting? question on 8/27/2008 in the ADO.NET Entity Framework and LINQ to Entities (Pre-release) forum:

We will put something out which will be a recap of the findings.

We we still need to do the final post mortem internally and then publish.

It’s the timetable that’s missing.

ADO.NET Data Services (Astoria)

•••• Shawn Wildermuth’s My ADO.NET Data Services/Silverlight 2 Article on MSDN Magazine post of 8/31/2008 points to his “Create Data-Centric Web Applications With Silverlight 2” article for the “Data Services” section of MSDN Magazine’s September 2008 issue. Shawn says:

What is cool about this approach is that you can issue LINQ queries on the client (in Silverlight 2) that will communicate with Data Services via the REST interface and execute queries and update data on the server.  The substantial difference that you will have to get used to is the use of Asynchronous LINQ queries in Silverlight 2.  Check out the article for all the details.

••• Marcelo Lopez Ruiz adds his two-cents to the Astoria history book with his ADO.NET Data Services History of 8/28/2009.

• Vardi posted his Data Service Viewer 1.0 WinForm source code to CodePlex on 8/27/2008. Vardi says:

ADO.NET Data Services Tool help[s] you to create the query URL and view the result.

• Marcelo Lopez Ruiz points out that “DateTimeOffset and Time properties are not available as CLR types in ADO.NET Data Services” in his Gotcha with EDM types in ADO.NET Data Services post of 8/27/2008.

Marcelo Lopez Ruiz continues with the reasons to use EF as Astoria’s back end in his timed Another ADO.NET Data Service metadata tip post of August 26. (Marcelo is on a one-week vacation.)

SQL Server Data Services (SSDS)

•••• Roger Jennings recommended that SSDS and Other Windows Cloud Services Should Have Their Own Blogs on 8/30/2008, seconding Ayende Rahien’s proposal of the day before.

••• Niraj Nagrani, Soumitra Sengupta, and David Robinson deliver A Candid Look at SQL Server Data Services and the Business Scenarios it Addresses in an 8/28/2008 interview by Greg Hughes. The trio tackles the following topics:

  • SSDS isn’t a hosted instance of SQL Server in the cloud, it’s an Internet-based data utility powered by SQL Server
  • Target market is businesses who offer Sofware as a Service (SaaS) applications, including small and medium-sized businesses, with multi-tenancy as an important feature
  • Integration of authentication with the BizTalk Services Identity Provider will be rolled out in the “very near future.”
  • Symmetry with on-premises instances will be outside-in rather than inside-out.
  • SSDS have the capability to hand on-premises data to SQL Server Integration Services (SSIS) and pump it up to the cloud or vice-versa.
  • Microsoft Sync Services will make SSDS into a “data hub.”
  • SQL Server Reporting Services and Analysis Services will be used to deliver reports on uptime, performance and the like.
  • SSDS will grow to 5,000 nodes next year.
  • Open beta will occur shortly after PDC 2008 and SSDS will go live in the first half of 2008.
  • SSDS will be the preferred store of compliance data for large businesses.

•••• Dave Robinson says in SSDS Tech-Ed Online Video Posted of 8/29/2008 that the interview was conducted at Tech•Ed North America 2008, which was held in early June, so the “very near future” appears not so near after all.

•• Soumitra Sengupta discusses Jon Udell’s “continuum of access styles” as it applies to SSDS in his Jon Udell cURL's with SQL Server Data Services post of 8/27/2008.

I’m not sure if just REST and SOAP as wire formats for queries constitute a “continuum,” but supporting AtomPub, JSON, and POX as wire formats as promised might qualify.

• Jon Udell’s The continuum of access styles in the emerging Microsoft cloud post of 8/27/2008 mentions his ability to use cURL for basic SSDS navigation with the REST query protocol. Jon concludes:

Microsoft platforms have not historically encompassed the continuum of access styles. Happily, the emerging cloud does. And while the novelty of “just coding to a URL” on a Microsoft platform will undoubtedly attract some tirekickers who otherwise wouldn’t show up, the real draw will be the ability to exercise choice along the whole continuum.

That choice, by the way, is not only relevant to developers accessing hosted, web-facing services. It will matter as much — and with the SOAP option, even more — to developers accessing on-premises services behind the corporate firewall and across corporate boundaries. Facing outward or inward, you’re most productive when you can choose the right access style for the job at hand. Between the realm of the 100% Microsoft coder and the 0% Microsoft coder, a wide and fruitful middle ground is opening up.

Ryan Dunn complements Eugenio Pace’s Concurrency in SSDS post of 8/1/2008 for the SOAP protocol with Concurrency with SSDS via REST of 8/26/2008.

•• Mike Amundsen recounts his problems during the outage in the SSDS is unavailable for all beta users? (2008-08-26 06:00 PDT) [Resolved] thread in the SQL Server Data Services (SSDS) - Getting Started forum.

• Roger Jennings’ SQL Server Data Services Beta Encounters First Major Unscheduled Downtime post describes the approximately 7.5 hour unscheduled outage that occurred on August 26, 2008. From the post:

The SSDS team is to be commended for keeping testers up to date on the progress of bringing the service back up. Their response contrasted with Amazon’s failure to alert customers of their February outage, as reported in Amazon Web Services Outage: Causes And Remedies of 2/16/2008.

•• The preceding post has been updated for subsequent events and blog posts and was moved to a separate post due to its increasing length.

Gianpaolo Carraro’s Multi Tenant Data Access (MTDA) Blueprint post of August 25, 2008 announces the availability of the MDTA Blueprint on CodePlex and a Channel 9 interview with Eugenio Pace, the developer. Here’s part of the description:

The Multi Tenant Data Access (MTDA) Blueprint, part of the Software-plus-Services Blueprint program, provides guidance on writing a SQL Server based, single instance, multi-tenant data access layer similar to that used in LitwareHR sample application (SQL Server version).

You need the S+S Blueprints Manager from CodePlex to install the MTDA blueprint. (I was unable to use it with my installation of VS 2008 SP1.)

Note: This blueprint doesn’t use SSDS, as far as I can determine so far.

ASP.NET Dynamic Data (DD)

•• Matt Berseth goes hog wild with home-page menu customization in his A Dynamic Menu For Your Dynamic Data post of 8/27/2008. Matt says:

I have my tables organized into 4 categories: Sales, People, Products and Reports.  And the cool thing is that this menu is completely dynamic.  You can add, remove or reorganize the categories without touching the UI.  And depending where you are keeping your metadata you could even do this without recompiling your app.  The grouping is automatically discovered from the metadata and the menu is built solely off the it so everything 'just works'.

Besides adding the grouping information, I also tagged each of my tables with a custom description that I am displaying under the grids title.  Nothing too complicated, but still interesting.

LINQ to SQL

•••• Damien Guard’s T4 template update for LINQ to SQL in his original post of 8/29/2008 was premature. The latest version will add:

  • Inheritance support
  • VB.NET generation
  • DataContract serialization

But it won’t support stored procedures or composite primary keys.

An updated link in future issue of this post will be provided when the template is fully cooked.

••• Rob Conery’s Working With Linq's Expression Trees Visually post of 8/29/2008 shows you how to extract and install the Expression Tree Viewer add-in from the CSharpSamples.zip file and use it to view LINQ to SQL expression trees.

•• See Jacob Proffitt’s Changing Table Names in an OR/M post of 8/27/2008 in the “Entity Framework” section.

Simon Segal explains how POCO improves inheritance for LINQ to SQL in his lengthy post of 8/26/2008. He promises:

I will shortly be posting a framework that makes working in a POCO and DDD style much simpler. The Framework includes implemented Specification Patterns, Fetching Strategies and Extensible Repositories for your LINQ To SQL pleasure.

Jeff Atwood recommends adding the NOLOCK statement to SELECT queries to solve a mysterious deadlock problem with LINQ to SQL in his Deadlocked! post of 8/25/2008.

Jonas Stawski recommends being extra-careful when Recreating Entities with Linq To SQL in his 8/25/2008 post.

LinqMaster uncovers an arcane bug with insert triggers and provides a workaround in LINQ to SQL Database Trigger Bug – Workaround of 9/25/2008.

Rico Mariani answers questions by readers of his LINQ to SQL performance analysis series in Linq Compiled Queries Q&A of 9/25/2008.

LINQ to Objects, XML, et al.

••• Bart De Smet goes into excruciatingly detailed coverage of the use of SOS (a.k.a. “Son on Strike”) with dynamic expression trees in his lavishly illustrated To Bind or Not To Bind – Dynamic Expression Trees – Intermezzo: SOS in Visual Studio. Bart says:

In this post I want to point out that you can actually live without that visualizer and go the hard-core way using SOS, … the WinDbg extension for managed code debugging that ships with the .NET Framework (sos.dll). A little-known fact is that SOS can be loaded directly in Visual Studio through the Immediate Window.

•• Martin Hinshelwood says LINQ to XSD is “Absolutely brilliant” in his LINQ to XSD post of 8/28/2008. I’d say the LINQ to XML team would be “absolutely brilliant” if they posted a LINQ to XSD release version instead of Alpha 0.2.

• Bart De Smet’s second post of 8/27/2008, To Bind or Not To Bind – Dynamic Expression Trees – Part 2, delves into IL generation, expression compilation, and emitting code .

• Bart De Smet continues his dissertation on dynamic expression trees with To Bind or Not To Bind – Dynamic Expression Trees – Part 1 of 8/27/2008 by creating a DynamicExpression abstract class with MethodCallDynamicExpression, LambdaDynamicExpression and ParameterDynamicExpression factory classes.

• Jared Parsons uses a LINQ to XML-powered word-wheel application to demonstrate how to “Increase LINQ Query Performance” in his “Basic Instincts” column for MSDN Magazine’s August 2008 issue.

• Ira’s LINQ Distinct, a DataTable and the IEqualityComparer<T> post of 8/26/2008 describes how to write a custom IEqualityComparer<DataRow> for LINQ to DataSet to enable the Distinct() operator to operate on entire rows instead of a single designated column.

Bart De Smet’s To Bind or Not To Bind – Dynamic Expression Trees – Part 0 post of 8/26/2008 is the start of a new series about building dynamic expression trees.

SQL Server Compact (SSCE) 3.5 and Sync Services

No SSCE/Sync Services posts to date.

Visual Studio 2008 Service Pack 1 (General)

• Mike Taulty’s Final .NET Client Profile ( 3 ) post of 8/26/2008 points to his WPF, ClickOnce and the .NET Client Profile Channel9 video of the same date with this description:

A simple demo of building a "Hello World" application with Visual Studio 2008 Service Pack 1 and then deploying it via ClickOnce to a clean Windows XP machine using the .NET Client Profile rather than the full .NET Framework.

• Mike Taulty’s The .NET Client Profile post of 8/26/2008 and The .NET Client Profile ( 2 ) of 8/27/2008 cast a jaudiced eye on the process of installing .NET 3.5 SP 1 on client computers with ClickOnce. Mike says:

If you're building something like a .NET WPF client application then one of the major bugbears (for both you and for Microsoft - let's be honest here :-)) is trying to get the .NET Framework on to the client machine.

We're trying to make this easier but if you were to look at the recent .NET Framework packages you'd perhaps not be able to tell that :-)

Miscellaneous (WPF, WCF, Silverlight, etc.)

•••• Phil Haack announces ASP.NET MVC CodePlex Preview 5 Released on 8/29/2008 and says the next release will be the official beta version. The post contains links to other important MVC-related articles.

••• Roger Jennings reports problems with Internet Explorer 8 Beta 2’s new Web Slices feature in Fail on First Try of Internet Explorer 8 Beta 2 Web Slices of 8/29/2008. •••• Updated

•• Roger Jennings takes Jaiku’s new Google App Engine implementation to task in Jaiku + Google App Engine = Fail of 8/28/2008. The malformed home page shown in the post, which has lost its CSS content, took over a minute to load.

•• Aaron Skonnard posted Endpoint Screencasts - Hosting WCF Services in IIS to Channel 9 on 8/28/2008:

In this short video, CSD MVP Aaron Skonnard from PluralSight guides the viewer through how to host your WCF Service in IIS. We will start with the simple WCF service that we created in the first screencast, hosting it as an ASP.NET svc file. Aaron then demonstrates adding a couple endpoints (for greater detail, see the screencast on creating WCF endpoints) and accessing the service. Once we have our WCF service hosted in ASP.NET, we add it as an application to IIS for consumption.

• The IE Team posted IE 8 Beta 2 for download on 8/27/2008. I installed it to try Web Slices on LINQ and Entity Framework Posts for M/D/YYYY+. The first item in this category recounts my lack of success with implementing Web Slices.

John Papa’s Great Fiddler Tip For Localhost Testing post of 9/26/2008 describes Shawn Wildermuth’s solution to getting Fiddler 2 to recognize the Cassini Web server’s localhost:port number: Prefix the port number with a period.

WebSlice Content for Internet Explorer 8 Beta 2

OakLeaf LINQ and Entity Framework Links

Last Updated: 8/31/2008 2:20 PM PDT

  • Entity Framework Additions
  • SQL Server Data Services Additions/Updates
  • ASP.NET Dynamic Data Additions
  • LINQ to SQL Additions
  • LINQ to Objects, XML, etc. Additions
  • Miscellaneous Additions
    • ASP.NET MVC Preview 5 Released to CodePlex
    • Problems with IE8B2's Web Slices Feature

Saturday, February 23, 2008

LINQ and Entity Framework Posts for 2/18/2008+

Note: This post is updated daily or more often, depending on the availability of new articles.

Alex James Posts a Teaser About Entity Framework Support for Associations with Payloads

As Alex mentions in his Associations with Payloads post of 7/24/2008, Entity Framework (EF)automatically creates a many:many association instead of an entity for a table that consists entirely of two (or more) foreign key fields.

If you add payload field(s) to the table, such as Quantity [,UnitPrice, Discount, etc.], EF treats the table as an entity with one:many and many:one associations with its related tables.

Alex says:

It turns out however that with a little jigger pokery in the CSDL, MSL and SSDL it does support them, sort of.

However he doesn't provide the "jigger pokery," which I assume is Kiwi for "hack" or the like, but says it's coming in the next post. Since his last preceding post was February 11, you might be in suspense for a couple of weeks.

Added: 2/24/2008

Update 2/26/2007: See LINQ and Entity Framework Posts for 2/25/2008+ for the outcome.

Scott Hanselman Uses LINQ to XSD as an Example of How Microsoft Projects  Appear to be Abandoned

In LINQ to Everything - LINQ to XSD adds more LINQiness of February 22, 2008, Scott says he hears the following about many small Microsoft projects:

"Is _______ dead? I haven't heard anything in a month from _____ team's blog! It must be dead.

and then goes on to describe the benefits of augmenting LINQ to XML with LINQ to XSD using the arcane Open Financial Exchange (Ofx) XML schemas. (Microsoft, CheckFree, and Intuit initiated Ofx, which appears to have a semi-active blog.).

I suggested in a comment:

Another way to indicate a project isn't dead is to respond to questions about its status in the appropriate MSDN forum.

I requested the status of LINQ to XSD for .NET 3.5 RTM in a LINQ Project General forum Status of LINQ to XSD for RTM? on November 17, 2007. Two others seconded my request.

Not a word from the XML team.

I'm trying again with a status request for Shyam Pather's LINQ to Stored XML implementation, but I'm not optimistic about the result.

See the "LINQ to XSD Alpha 0.2 for VS 2008 RTM Is Available for Downloading" topic below for more details and background on the new release.

Added: 2/23/2008

Jim Wooley Uses LINQ to XML to Query All Shakespeare Plays Very Quickly

Jim's Querying the complete plays of Shakespeare using LINQ to XML post of February 22, 2008 describes his quest to find with LINQ to XML the fifty characters (SPEAKERS) in 37 plays having the most LINEs. The total size of the 37 files he concatenated into a single collection of XElements is about 7.75 MB.

Jim says:

The amazing thing with this process, running all three queries here, including the one which loads the full XML from the various files takes less than a second. I haven't had time to do a full performance test, including memory load, but the initial results are quite impressive! [Emphasis added.]

I agree.

Added: 2/23/2008

LINQ to Objects and LINQ to XML Videos from Tech*Ed 2007 Developers Barcelona Start with Disclaimer

Charlie Calvert's Video of Luke Hoban's In-Depth Look at C# 3.0 post of February 22, 2008 points to videos of these two presentations:

These are the first videos of presentations from Microsoft events that start with a disclaimer. Fortunately, you don't need to choose the "I have read the disclaimer and agree to be bound by it" option to watch the segment. I'm waiting for the first conference that requires agreement to a disclaimer as a condition of registration.

Added: 2/23/2008

Scott Guthrie: Silverlight 2.0 Beta 1 Will Support LINQ to XML

Scott's First Look at Silverlight 2 post of February 22, 2008 says that his team is "shortly going to release the first public beta of Silverlight 2" and notes that:

It also includes LINQ and LINQ to XML library support (enabling easy transformation and querying of data), as well as local data caching and storage support.  The .NET APIs in Silverlight are a compatible subset of the full .NET Framework.

It's amazing that the Silverlight team has been able to incorporate such an amazing array of new features in such a small package:

The Beta1 release of Silverlight 2 is 4.3MB in size, and takes 4-10 seconds to install on a machine that doesn't already have it.

Added: 2/22/2008

Jon Skeet Offers a Animated LINQ to Objects Visualizer

Jon's Visual LINQ: Watch query expressions as they happen! post describes an animated WPF project that displays the dynamics of LINQ to Objects query processing. You can download the source code, watch a screencast, or both.

Added: 2/22/2008

LINQ to XSD Alpha 0.2 for VS 2008 RTM Is Available for Downloading

Shyam Pather, Dev Lead for the XML Team, says in his LINQ to XSD Alpha 0.2 post of February 21, 2008:

I’m happy to announce that today we are re-releasing the LINQ to XSD Preview Alpha 0.2 for Visual Studio 2008. The previous preview release of LINQ to XSD targeted Beta 1 of Visual Studio 2008 but did not work on later builds. Many of the people who originally downloaded and tried the LINQ to XSD Preview Alpha requested an update for the final release of Visual Studio 2008 – this release is it. You can download it from here.

I'm one of the one of "the people who originally downloaded and tried the LINQ to XSD Preview Alpha" who "requested an update for the final release of Visual Studio 2008." See my LINQ to XSD Redux and LINQ to Stored XML Coming post of December 4, 2007 (Updated 1/14/2008) for more background on the original development of LINQ to XSD by Ralf Lammel.

Good news! Now what we need from the XML Team is a progress report on LINQ to Stored XML.

Added: 2/21/2008

ADO.NET Team: LINQ to SQL Support for New SQL Server 2008 Features "Coming Soon"

According to Faisal Mohamood, LINQ to SQL Program Manager, in his Coming soon to LINQ to SQL post of February 21, 2008:

Things aren’t so quiet over here on our end, even if it looks that way. The team has been busy adding features so that you will have better support for SQL Server 2008 in the future. Things we’ve been working on include support for new T-SQL data types that are being introduced in SQL Server 2008 – namely DATE, TIME, DATETIME2 and DATETIMEOFFSET, so that you can enjoy the same rich LINQ support and CUD support over data that uses many of the new types that are being introduced in SQL Server 2008.

Stay tuned and watch this blog for more on this as we get closer to releasing some of this and other new functionality!

Sounds to me like the LINQ to SQL upgrade is a candidate for VS 2008 SP1.

Added: 2/21/2008

VS 2008 SP1 Appears to be in the Works Before the Product's Official Release

The ReadMe file for SSCE 3.5 SP1 Beta for EF Beta 3 contains the following statement and admonition:

Microsoft SQL Server Compact 3.5 SP1 is the service pack release for the SQL Server Compact 3.5. SQL Server Compact 3.5 SP1 releases with SQL Server 2008 and Visual Studio 2008 SP1. [Emphasis added.]

Important:

All references to SQL Server 2008 and Visual Studio 2008 SP1 in this SQL Server Compact 3.5 documentation refer to a pre-release version of SQL Server 2008 and Visual Studio 2008 SP1. [Emphasis added.]

The SQL Server Compact Release Versions post of February 8, 2008 (updated for build 3.5.5626) contains a table with the following three latest entries for SSCE releases:

Product Name Release Vehicle Version

SQL Server Compact 3.5 SP1 Beta for ADO.NET Entity Framework Provider Beta

Download Center

3.5.5626

SQL Server Compact 3.5 SP1 Beta

SQL Server 2008 CTP6

3.5.5626

SQL Server Compact 3.5 SP1 Beta

Visual Studio 2008 SP1 Beta

 

These are the first references in official Microsoft documents about VS 2008 SP1 that I've seen. On 2/4/2008, Brian Keller said in a VSTS Forum Answer Re: When is Visual Studio 2008 SP1 coming out? post:

We haven't announced any dates around SP1. Once details become available we'll make them known but for now it's too early to say anything about the schedule.

The VS 2008 Web Development Hot-Fix Roll-Up Available that Scott Guthrie announced on February 8, 2008 isn't a service pack.

It's interesting that Microsoft is announcing a service pack for VS 2008 before the product is officially released.

Added: 2/21/2008

SQL Server Compact Edition 3.5 SP1 Beta for Entity Framework Beta 3 Is Available

Ambrish Mishra, Program Manager for SSCE, announced Download available for SQL Server Compact 3.5 SP1 Beta for ADO.Net Entity Framework Beta 3 on February 20. This is a special version (Build 3.5.5626) of SSCE SP1 Beta 1 specifically for EF Beta 3. This build is the same as that released with the current SQL Server 2008 CTP6. (See the SQL Server Compact Release Versions post of February 8, 2008 for build and release vehicles.)

Ambrish's post includes step by step instructions for creating a working Entity Data Model with the included Northwind.sdf database file.

You can download SSCE v3.5 SP1 Beta for EF Beta 3 here. Be sure to check out the ReadMe file before installing this SSCE Beta, which obviously is not fully cooked. There are 11 known issues, some of which seem to me to be serious deficiencies.

I remain curious as to why anyone would layer heavyweight EF components over a lightweight, single-user database like SSCE.

Added: 2/21/2008

Roger Alsing: LINQ to NPersist Is Progressing

Roger's More Linq support for NPersist post of February 20, 2008 describes his technique for adding LINQ support for Mats Helander's NPersist object/relational mapping tool by generating LINQ-like NPath instead of SQL queries. Mats welcomed Roger back to the NPersist project in his Roger Is Back post of January 9, 2008. NPersist is now at version 1.0.10; you can read more about it in this 200-page Inside NPersist manual (.doc format).

Here are links to Roger's earlier posts on the topic:

Download the current NPersist source code, binaries or both here.

Update 2/24/2008: Roger has LINQ to NPersist running with a Microsoft Access database because his development machine is dead, according to his Linq to NPersist to MS Access post.

Dave Longnecker Replaces Web Gallery 2.0's Custom n-Tier Data Layer with LINQ to SQL

The details are in Dave's WebGallery 2.0 #2 - HttpHandler and LINQ Data Model post of February 20, 2008. The post also includes some links to his earlier posts on LINQ:

Added: 2/21/2008

Richard Bushell: Use Timestamp Fields for Concurrency Conflict Management with the LinqDataSource Control

If you use LINQ to SQL's default value-based concurrency conflict management feature, the LinqDataSource control stores the original values in ViewState. In his The LinqDataSource and the Hidden Viewstate of 2/21/2008, Richard goes into detail about how value-based concurrency works and the value of replacing original values with a single timestamp column.

His earlier How to Update Data with LINQ-to-SQL post of February 18, delves into updating rows without bringing an entity instance into memory.

Added: 2/21/2008

Ruurd Boeke Continues His Postcompiling for Entity Framework Series

Ruurd's initial post about using PostSharp to add IPOCO interfaces to an Entity Data Model (see the "An Automatic IPOCO Implementation for Entity Framework" topic below) has turned into a Postcompiling for Entity Framework series. Here's his table of contents with current links:

Here's a link to Ruurd's Entity Framework Contrib (EFC) project on CodePlex.

Added: 2/21/2008

Julie Lerman to Present Two Entity Framework Sessions at Tech*Ed US Developer 2008

Julie's Entity Framework at TechEd post of February 19, 2008 announces that she'll present

  • Advanced Entity Framework: Entity Data Model in the Enterprise
  • .NET 3.5 Data Access Guidance

at TechEd 2008 US Developer in Orlando June 3 - 8, 2008.

Register before April 4, 2008 and save $200 off registration costs.

Don't miss her .NET Rocks! Entity Framework podcast next Tuesday, February 26.

Added: 2/20/2008

Beth Massi Demos LINQ to SQL Master/Child Forms with Stored Proc Updating

Beth's One-To-Many (Master-Detail) Forms with LINQ to SQL post of 2/19/2008 shows you how to create an Orders/OrderDetails master-detail form, save edits made with stored procedures to the entities, and eliminate associated entity and referential integrity conflict exceptions when deleting OrderDetails entities.

Beth doesn't use Northwind for the demo because she wants foreign key values to be NOT NULL and use timestamp columns for concurrency conflict management. Both good ideas, but easy to implement on a copy of Northwind.

Added: 2/19/2008

Frans Bouma Tackles Function Mapping and Local Methods in LINQ to LLBLGen Pro

Frans is closing in on his epic LINQ to LLBLGen Pro implementation in Developing Linq to LLBLGen Pro, part 13 of February 19, 2008. This episode deals with issues with invoking functions within LINQ queries that don't map to database functions.

All store-specific ADO.NET data providers must support a designated set of canonical functions defined for aggregate, bitwise, date and time, math, string and other operations. Functions invoked by members of a projection that aren't canonical functions will execute on the result set in memory but not if they're included in the query (for example, in the Where clause.)

Frans' post deals with the following specific issues:

  • Constants in the projection
  • In-memory methods/property calls in the projection
  • Mapping methods and properties as database constructs
  • Booleans in projections
  • Lambda-based function usage
  • Object creation inside projections
  • LINQ to SQL oddness

and is longer than most of my posts!

His next post, which he hopes will be the last will cover defining function mappings for RDBMSs other than SQL Server and adapting LINQ queries to use LLBLGen's prefetch paths feature.

Added: 2/19/2008

Jim Wooley Explores LINQ Queries Against Self-Joined Tables

Jim's Managing self-referencing tables with LINQ to SQL post of February 18, 2008, demonstrates how to query a table with a self-join that generates a data tree. He uses the Northwind Employees table whose ReportsTo column contains the EmployeeID of the person's boss.

Jim notes that you can't use LoadOptions to eager load the Employees set, because eager LoadOptions doesn't allow cycles (a.k.a., cyclic references.)

Added: 2/19/2008

Pablo Castro: Links and Link Expansion in ADO.NET Data Services

In his Related entries and feeds: links and link expansion post of February 18, 2008 Pablo requests input from the community on the Astoria team's approach to handling GET operations for associated entries in Atom graphs:

This write up briefly describes how we model associations between resources as Atom links and proposes a usage pattern of the atom:link element to support retrieving resource graphs in a single response. We're looking for feedback on the approach and also to get folks thinking about inlined content and whether it should be considered an extension to Atom.

Pablo refers to his earlier post, AtomPub support in the ADO.NET Data Services Framework of 2/13/2008 for background. I discussed this topic in my  Pablo Castro: ADO.NET Data Services and the Atom Publishing Protocol post of February 14, 2008, updated 2/16/2008 for Dare Obasanjo's posts on AtomPub extensions.

The two topics under consideration are:

1. Links for modeling associations between resources: Use the current link syntax:

<link rel="related" title="Customer" href="Orders(11077)/Customer"  type="application/atom+xml;type=entry" />
<link rel="related" title="Employee" href="Orders(11077)/Employee" type="application/atom+xml;type=entry" />
<link rel="related" title="Order_Details" href="Orders(11077)/Order_Details" type="application/atom+xml;type=feed" />
<link rel="related" title="Shipper" href="Orders(11077)/Shipper" type="application/atom+xml;type=entry" />

with the "starting" end of the association as the title. An alternative is a custom Atom attribute. I recommend minimizing the use of custom attributes. It would be helpful if developers using Entity Framework data sources would singularize EntityType names and End names of the 1 or 0...1 side of AssociationSets, as in the above example. Processing should retain the nouns' number.

2. Expanding links inline. Using the current $include constructs to indicate which associations to expand and include them as content within the <link> element seems appropriate to me.

Note: This may expand into an independent post after I do some additional investigation on the topic, as well as how ADO.NET Data Services fit into the Internet Service Bus that's implemented as a CTP by BizTalk Services.

Update 2/22/2008: Pablo's "Data Friction", spot-on post of February 20, 2008 cites and agrees with Jon Udell's Overcoming data friction article of the same date, which laments the need for Web screen scraping because the underlying databases aren't Web-accessible.

Ruurd Boeke: An Automatic IPOCO Implementation for Entity Framework

Ruurd's Introducing Entity Framework Contrib: Easy IPoco implementation V 0.1 of February 18, 2008 describes his Entity Framework Contrib (EFC) project on CodePlex. EFC implements the

  • IEntityWithChangeTracker
  • IEntityWithKey
  • IEntityWithRelationship

interfaces, which increase the Entity Framework's "persistence ignorance quotient" to IPOCO (Plain Old CLR Objects with Interfaces). Postsharp automatically generates and implements the three interfaces from a POCO class in IL when you build your project. However, the class must be decorated with a custom attribute.

The Postsharp folks ask:

Have you already implemented things like transaction management, logging, caching, or security? In each method, you had to write a same dozen of lines of code, right?

With PostSharp, you can encapsulate these aspects as custom attributes. You can make your own custom attributes that will really add new behaviors to your code! This is sometimes called aspect-oriented programming (AOP) or policy injection.

For more on persistence ignorance, see Danny Simmons' Persistence Ignorance: OK, I think I get it now post of June 2, 2007 and my Persistence Ignorance Is Bliss, but Is It Missing from the Entity Framework? of April 24, 2007.

LINQ to Opf3: An Implementation of LINQ for Chili Software's Opf3 O/RM

Christian Liensberger's Opf3 and LINQ support post of February 18, 2008 announces that Chili Software's Object Persistence Framework 3 (Opf3) now includes support for LINQ by adding the Chili.Opf3.Linq namespace.

Opf3 is a simple O/RM that offers a free Express Edition that maps up to eight tables to classes with a maximum of eight properties each. Opf3 supports most popular commercial and open-source databases that have ODBC or OLE DB drivers.

A single developer license with source code costs US$199; a site license is $699. A wizard plug-in that generates classes and enables customizing the autogenerated mapping is available for $99 and $349. Opf3/Wizard bundles are $249 (single) and $999 (site).

For comparison, LLBLGen Pro licenses range from €229 for a single license to €159 each for 20 or more, excluding VAT.

Charlie Calvert: LINQ Librarian

Charlie's LINQ Books post of February 17, 2008 lists published and forthcoming LINQ-related books in the following categories:

  • Books on LINQ (5 published)
  • Books that Feature LINQ (3 C#, 2 ASP)
  • Not Yet Published (8, including mine)
  • Books on the LINQ Beta (2)

The preceding lists don't include Programming the Microsoft® ADO.NET Entity Framework by David Sceppa (Microsoft Press, scheduled for 7/9/2008.