Wednesday, August 20, 2008

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

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

• Updated 8/20/2008

Entity Framework (EF)

• Matthieu Mezil explains how to trick EF into accommodating a stored procedure for returning data from a SELECT statement that you don’t want to surface as an EntitySet on the ObjectContext in his EF: SELECT with a SP post of 8/20/2008.

• Julie Lerman’s Reposting Entity Framework Tutorials over on post of 8/20/2008 announces that she’s uploaded six of her EF tutorials, formerly available on the now-dark site, to

The .NET Rocks Duo interviews Dan Simmons and Stephen Forte on the EF Advisory Council for show #369 of 8/19/2008. Here’s the description:

Dan Simmons is back with Stephen Forte, a member of the EF Advisory Council, a group of outsiders who were brought in to help shape future direction for the EF. You might be surprised at who else was on the council, and what they are thinking about for the next version.

The action starts at 08:35, but Danny and Stephen don’t start talking about the first two-day EF Advisory Council meeting until 11:40. Danny gets into integrating the EDM with ADO.NET Sync Services starting at about 49:15 and a discussion of what’s coming in EF v2 at 52:20.

• Frans Bouma, lead developer of the LLBLGen Pro O/RM tool, takes on one of Stephen Forte’s comments about the Entity Data Model (EDM) in yesterday’s .NET Rocks interview (see above.) Frans’ lengthy "The Entity Data Model is much bigger than just an ORM" -- Stephen Forte post of 8/20/2008 argues that EF is yet another O/RM tool; nothing else.

I believe that Stephen was referring to the EDM and its implementations for other scenarios, such as Reporting Services and Sync Services, not to Entity Framework, which is the O/RM implementation of the EDM. Microsoft’s Zlatko Michailov (in Entity Framework and Object/Relational Mapping of 12/14/2007) and others, notably Shawn Wildermuth (in “Introducing the Entity Framework” of May 2007), have muddied the water by stating explicitly that the “Entity Framework is not an object/relational mapping tool” or words to that effect.

Roger Jennings discusses issues with long instantiation times when starting a Windows form project with an Entity Data Model from a 120-table database in his Entity Framework Instantiation Times with a 120-Table Database post of 8/19/2008.

• Julie Lerman’s Comparing times for loading models of different (exaggerated) sizes post of 8/20/2008 compares the times to cache the metadata of the AdventureWorksLT database (17 tables) and the 400-table database of her earlier Entity Framework Designer and Large Databases article. Julie’s 400-table example loads in about 4.4 seconds compared to about 9.5 seconds for my 120-table database. Her faster cache time might be due to a faster computer. I’m running Vista Ultimate on a Gateway desktop having a dual-core 2.8-GHz Pentium with 4 GB RAM (100+ MB free) and a 7,200-RPM SATA drive. Another possibility is a difference in the total number of columns and associations. My 120-table Huagati database has about 1,529 columns and 410 associations.

Matthieu Mezil’s SSDL View and CUD operations post of 8/19/2008 explains what happens when you “want to CUD an entity which maps on a table and (with Entity Splitting) a SSDL view?” He also includes the <Function> CUD elements you must add to the SSDL group and their mapping in the MSL group.

ADO.NET Data Services (Astoria)

• Aaron Skonnard’s new Wednesday Endpoint Screencasts series on Windows Communication Foundation (and Workflow) have started on Channel9. Here are links to the first two:

  • Configuring Services with Endpoints. This screencast introduces you to WCF adapters, bindings, and contracts, and shows you how to use the WCF Service Configuration Editor to modify these endpoints and add new endpoints. (8/20/2008)
  • Creating Your First WCF Service The screencast walks you through creating the service from scratch in VS2008 - defining a data contract, a service contract, and testing/hosting the service in VS2008. (8/13/2008)

Marcelo Lopez Ruiz explains why System.Data.Services.Internal is rather visible in his 8/20/2008 post.

Marcelo Lopez Ruiz describes the three methods of the DataService<T> class that you might want to override (CreateDataSource, OnStartProcessingRequest and HandleException) in his Overriding methods on System.Data.Services.DataService<T> post of 8/18/2008.

Raju Phani shows you how to implement a Count method on the server and client side of a ADO.NET Data Service in Entities , How many ways do I count thee? of 8/18/2008.

SQL Server Data Services (SSDS)

Soumitra Sengupta announces SSDS Software Developer Kit (SDK) Beta Released on MSDN on 8/19/2008. The SDK includes the command line tool and the SSDS Explorer that Soumitra demonstrated at TechEd 2008. You can download the SSDS SDK Beta

Mike Amundsen announced in an SQL Server Data Services (SSDS) - Getting Started thread, SSDSDeploy.exe demo app posted, “a new demo app that allows users to upload one or more files (using wildcards) to the SSDS servers.” Mike says,

One of the interesting items in this demo is a method GetMimeType(string filename) that uses the Registry to resolve the selected file's MIME type before sending it on to SSDS. The code is not very complex, but might have some security implications. I'd be curious to hear if anyone has trouble running the code in partial trust.

David Chappell’s “A Short Introduction to Cloud Services” white paper dated August 2008 provides “an enterprise-oriented view” of cloud computing as a whole, with the emphasis on cloud platforms:

As its name suggests, this kind of platform lets developers write applications that run in the cloud, or use services provided from the cloud, or both. Different names are used for this kind of platform today, including on-demand platform and platform as a service (PaaS). Whatever it’s called, this new way of supporting applications has great potential.

Microsoft sponsored the whitepaper but the document covers Amazon, Google and Microsoft platforms and/or services. There’s no mention of SSDS but it clearly conforms to Chappell’s definition of a cloud platform.

Thanks to Mary Jo Foley for the pointer to the whitepaper in her Piecing together Microsoft’s cloud-computing vision of 8/19/2008.

ASP.NET Dynamic Data (DD)

No new DD posts as of 8/19/2008 17:30


• Jim Wooley’s Where clause optimized with VB 2008 SP1 post of 8/20/2008 explains VS 2001 SP1’s simplification of LINQ to SQL WHERE clauses by replacing the WHERE (COALESCE(CASE … WHEN)) with a simple comparison expression for Nullable(Of T) types and the VB bug fix by the VB Ordering of Anonymous Type Properties change with VS 2008 SP1 post of the same day.

Dan Whalin provides a detailed tutorial on substituting XML mapping for .dbml files in his Using LINQ to SQL XML Mapping Files – Step by Step post of 8/19/2008.

LINQ to Objects, XML, et al.

• Alex Thissen points out that “[t]he new XML API that comes with LINQ to XML has some peculiar ways of handling the XML declaration (aka the XML prolog)” in his XML declarations in LINQ to XML post of August 19, 2008, and then points out workarounds for the peculiarities.

• LinqMaster’s Tutorial Reading A Text File Using LINQ to Objects post of 8/20/2008 shows you how to parse a comma-separated (or tab-separated) values file directly into a LINQ query.

Bart De Smet’s Probably The Most Powerful LINQ Operator: SelectMany post of 8/19/2008 tells you more than you might have wanted to know about the SelectMany() standard query operator. He analogizes SelectMany() with nested foreach statements that iterate over Cartesian products created by multiple from statements in LINQ queries.

Eric White is Microsoft’s Technical Evangelist for Open XML and usually writes posts about LINQ to XML. For a change, two of these three Find Duplicates using LINQ, Use a Lambda Expression for an Event Handler, Chunking a Collection into Groups of Three posts of 8/19/2008 are about LINQ to Objects.

SQL Server Compact 3.5 and Sync Services

No new SSCE or Sync Services posts as of 8/19/2008 17:30

Visual Studio 2008 Service Pack 1 (General)

Johathan Carter, Microsoft’s technical evangelist for the .NET Framework and Visual Studio, provides a detailed list of what’s in the recently release .NET 3.5 Enhancements Training Kit RTM.

Miscellaneous (WPF, WCF, Silverlight, etc.)


Frans Bouma said...

"I believe that Stephen was referring to the EDM and its implementations for other scenarios, such as Reporting Services and Sync Services, not to Entity Framework, which is the O/RM implementation of the EDM."
Then the EDM is nothing more than a pile of meta-data, which every o/r mapper has as input as well, otherwise there's no mapping.

And... if that's the case, it makes no sense at all to compare a pile of meta-data with a pile of code consuming said meta-data.