Sunday, August 17, 2008

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

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

••• Updated 8/17/2008 08:30 PDT: Explanation of ASP.NET Dynamic Data’s problem with EF and minor additions.

Updated 8/16/2008 18:15 PDT: Workaround for ASP.NET Dynamic Data’s "A property with name 'XX.Id' does not exist in metadata for entity type 'XX.XX.XXXX'” exception with the EF as the data source.

Updated 8/16/2008 12:30 PDT: Additions

Entity Framework (EF)

••• Asad Khan’s 49-page Entity Framework Supported Mapping Scenarios” white paper dated July 2008 carries the following summary:

This white paper enumerates the supported mapping scenarios in Entity
Framework. It also mentions important design considerations for store schema in
order to deal with advanced mapping scenarios.

Thanks to Julie Lerman for the heads-up on the white paper.

Kristofer Andersson’s Tools - Part 4 - Add-ins - Adding functionality to the Entity Framework EDMX designer post of 8/15/2008 describes EDMX Addin #1 to the Huagati DBML Tools: Renaming entity sets, entity types, properties, and navigation properties in EDMX (ADO.NET Entity Data Model) files. Kris says:

This is more or less similar to the DBML naming convention add-in but this one works with the Entity Framework designer instead of the LINQ-to-SQL designer. It updates the conceptual and mapping side and also comes with a new shiny options dialog allowing users to specify what naming rules to apply. The options dialog also has a “preview” field for each section at the bottom of the screen that shows what the outcome will be on classes/properties in the currently open EDMX file if using the selected settings.

The post contains screen captures of the addin being used with the HuagatiRes airline reservations database that’s described in my Comparison of Entity Framework and LINQ to SQL Projects Using a 120-Table Database post of July 13, 2008.

Julie Lerman proves EF doesn’t support projecting into known types or using custom properties from your partial classes in queries in her A few things you can't do with EF queries which you won't find out until runtime post of 8/15/2008.

Julie Lerman’s MSDN Forums post of 8/15/2008 announces she has three stars for 676 posts (count ‘em 676!) in the ADO.NET Entity Framework and LINQ to Entities (Pre-release) forum. Congrats!

Perhaps someone on the EF team will remove the “(Pre-Release)” suffix shortly. (But some consider v1 to be “pre-release” and v2 as the real “release” version.)

Roger Jennings finds SP1’s promised binding to many:one associations doesn’t work for upgraded projects in his Upgrading Databound Projects to Entity Framework V1 RTM Doesn’t Expose DataSource’s 1:Many Associations of 8/13/2008 (Updated 8/15/2008). The EF team is looking into the problem.

ADO.NET Data Services (Astoria)

••• Dare Obasanjo explains the essence of Representational State Transfer (REST) architectural style and its relationship to SOAP Web services in his Explaining REST to Damien Katz essay of 8/17/2008. Astoria provides a REST interface to EF or LINQ to SQL entities with AtomPub or JSON over HTTP as its wire protocol.

(Damien Katz is the creator of CouchDB, an Apache Incubator project for an open-source document-oriented database, which uses the “low REST” protocol. Low REST uses HTTP POST only; High REST uses GET, POST, and PUT verbs.)

Marcelo Lopez Ruiz’ Case Study for ADO.NET Data Services post of 8/15/2008 points to a Microsoft case study of Misys Healthcare Systems, which quotes Galen Murdock, President and CEO of partner Veracity Solutions:

ADO.NET Data Services gave us the ability to pull content dynamically from the server and also separate the markup from the data, which optimized performance.

Here’s the architectural diagram of the Misys/Veracity FreeNatal application from MisysVeracityCaseStudy.doc:

Hopefully, Marcelo delivered the last word about Silverlight and ADO.NET Data Services compatibility on 8/14/2008.

Gil Fink, a senior .NET developer and NET consultant for SRL Group (Israel), delivers part two of his ADO.NET Data Services tutorial: Building a .Net Client for ADO.NET Data Service (8/15/2008). Part 1, which covers the service side is ADO.NET Data Services Introduction of 8/10/2008.

Mike Flasko points to a new series of "How Do I Videos" videos about ADO.NET Data services. The first two members are here:

SQL Server Data Services (SSDS)

••• Sam Johnston reports in his “Dell Denied: 'Cloud Computing' both desciptive and generic” post of of 8/15/2008 that the US Patent and Trademark Office (USPTO) have denied Dell, Inc.’s application for a trademark (actually a servicemark) on “Cloud Computing.” The application was the topic of my Dell Attempts to Purloin “Cloud Computing” Trademark post of 8/3/2008. Sam says:

First [USPTO] argued that 'the applied-for mark merely describes a feature and characteristic of applicant’s services'. A mark is merely descriptive if it describes an ingredient, quality, characteristic, function, feature, purpose or use of the specified services. That is, 'cloud computing' simply describes a type of computing in the same way that 'yellow bananas' describes a (common) type of banana.

Furthermore, they have declared 'cloud computing' generic, in that it is 'incapable of functioning as a source-identifier for applicant’s services'. This makes sense given that few of us think 'Dell' when we think of 'cloud computing', even in this context.

Somitra Sengupta’s On going quiet and transparency in the design process post of 8/15/2008 explains why the SSDS team is reticent to adopt the ADO.NET Data Services and Entity Framework teams’ transparent design model until after PDC 2008. (In return, I’ll stop bugging them.)

ASP.NET Dynamic Data (DD)

••• Scott Hunter’s Workaround for Dynamic Data Entity Framework Posted post of 8/16/2008 explains the problem as follows:

The main issue is a slight mis-match in the names that Dynamic Data looks for in Entity Framework and the names that Entity Framework is actually exposing. When this problem occurs an error that looks like "A property with name 'XX.Id' does not exist in metadata for entity type 'XX.XX.XXXX'".

Luckily we made the data model providers which are classes that look at data model and tell Dynamic Data what the tables, columns, names, etc are a extensible system. This means we can distribute a replacement data model provider that solves the issue I mentioned above.

The moral of this story: Test your product with all likely data sources, rather than just today’s favored data source (LINQ to SQL).

Scott Hunter of the DD Team posted to the Dynamic Data Entity Framework Workaround thread 0f 8/16/2008 a message with a link to the workaround in CodePlex for the "A property with name 'XX.Id' does not exist in metadata for entity type 'XX.XX.XXXX'” exception with the Entity Framework as a data source.

Marcin Dobosz posted this response to DD’s problem with EF v1:

We have a solution that is pending testing that we will make available as soon as possible. We should have more details about this on Monday.

on 8/16/2008 in the ASP.NET Forum’s Dynamic Data SP1 chokes on Northwind and AdventureWorks using ADO.Net Entity Data Model thread.

Roger JenningsSerious Fail of ASP.NET Dynamic Data SP1 with Entity Framework v1 RTM Data Source of 8/14/2008 describes known blocking bug when using ASP.NET Dynamic Data with EF v1 RTM in VS 2008 SP1. (See above updates.)

LINQ to SQL

No posts found

LINQ to Objects, XML, et al.

••• Bart De Smet‘s Folding left, right and the LINQ aggregation operator post of 8/17/2008 provides insight into LINQ’s Aggregate operator from functional programming’s fold viewpoint.

Beth Massi interviews Yang Xiao, a tester on the VB IDE team, about the XML Schema Explorer in VS 2008 SP1: Channel 9 Interview: XML Schema Explorer in Visual Studio 2008 SP1.

Bart De Smet continues an extension of his “Custom LINQ Providers” session at Tech•Ed South Africa with The Most Funny Interface Of The Year … IQueryable<T>, an explanation of why IQueryable<T> is “such a special specimen.” See below for resource links.

John Papa reviews Bart De Smet’s LINQ to Active Directory implementation in LINQ to AD – Grade B of 8/15/2008 and makes a suggestion for improvement.

The XML Team announces that the XML Schema Explorer is included with SP1 in New XSD Functionality shipped in Visual Studio 2008 SP1 RTM of 8/14/2008.

Bart De Smet digs into issues of string equality in Expression Tree Normalization – How Many Ways To Say “String == String”? of 8/13/2008, which expands on his “Custom LINQ Providers” session at Tech•Ed South Africa. Bart’s TechEd 2008 South Africa Demo Resources post of 8/9/2008 provides links to downloadable files and other resources for his presentations.

Visual Studio 2008 Service Pack 1 (General)

••• Roger Jennings updated the two posts below on 8/17/2008 after finding the “An error occurred while performing the drop” message disappeared when recreating the data sources a second time. However, data sources based on EntityCollections (one:many associations) still throw errors when attempting to set the BindingSource.DataMember with code and the DataMember property value appears as None in the BindingSource properties sheet.

Roger Jennings updated The Joys of Installing Visual Studio 2008 Service Pack 1 with another problem (Upgrading Databound Projects to Entity Framework V1 RTM Doesn’t Expose DataSource’s 1:Many Associations in the Entity Framework section) on 8/13/2008.

Steve Lasker explains Why doesn't Visual Studio 2008 SP1 installer update SQL Server Compact 3.5 for Devices? (8/13/2008).

SQL Server Compact 3.5 and Sync Services

From Liam Cavanaugh’s Now Available - SyncToy 2.0 File Synchronization post of August 14, 2008:

SyncToy 2.0 for Windows is available as a free download and is an easy to use, customizable application that helps you copy, move, rename, and delete files between folders and computers.

SyncToy is powered by Microsoft Sync Framework and is yet another example of how Sync Framework helps to create end-to-end solution for enabling synchronization of any content or data.

In my view, Sync Toy is a simple counterpart to Live Mesh’s synchronization services that developers can customize for their own purposes.

Steve Lasker announces SQL Server Compact 3.5 SP1 available for Win CE 5.0 and 6.0 Platform Builder (8/14/2008).

The Microsoft Sync Framework Group published 3 (more) New Sync Samples - Sync 101 for Sync Framework SDK v1.0 on 8/14/2008.

Miscellaneous (WPF, WCF, Silverlight, etc.)

Silverlight guru Matt Berseth demonstrates Custom Sort Icons with Silverlight 2's DataGrid Control and provides source code, too (8/14/2008.)

Rudi Grobler published Introduction to the WPF DataGrid, a detailed tutorial on the WPF DataGrid CTP to the Code Project on 8/12/2008.

Varsha Mahadevan posted the WPF DataGrid CTP to Windows Presentation Foundation (WPF) with links to WPFToolkit_Binaries.zip and WPFToolkit_SourceAndBinaries.zip on 8/11/2008.

1 comments:

Anonymous said...

Roger,

Always thought with MS products that v1 was alpha, v2 was the beta and v3 is finally stable enough for use:) But in the case of EF, I am hoping they are close enough with v2. Douglas