Saturday, May 24, 2008

LINQ and Entity Framework Posts for 5/22/2008+

Diego Vega Explains How the Entity Data Source DataBinds Complex Types to ASP.NET Server Controls

Diego's EntityDataSource's flattening of complex type properties post of May 24, 2008 is an expansion of the answer he give Julie Lerman in response to her Re: DataBinding Complex Type properties question of the same date in the ADO.NET Entity Framework and LINQ to Entities (Pre-release) forum. This post is an expansion of Diego's earlier EntityDataSource: To wrap or not to wrap post of May 13, 2008.

In short, the EntityDataSource (EDS) flattens complex properties to enable two-way databinding to ASP.NET controls with Eval("Address.Street"), DataField = "Address.Street" and Bind("Address.Street") methods. An exception is one-way binding to ComboBoxes which requires an explicit projection with an alias, such as Select ContactID, Address.Street As Street.

Added: May 24, 2008

Francois Vanderseypen Explains Why He Didn't Use Entity Framework in his Sample Project

In his Linq To Sql or Entity Framework? post of May 24, 2008 Francois says he decided not to use Entity Framework for the Northwind Factory v2.1 sample project for the following reasons:

It seems Microsoft had the intention to ship the EF with VS2008 but a lack of time forced them to drop it and it’s now planned for SP1. Still even at this SP1-beta stage it’s somehow unacceptable that the multi-tiered solution, which should be there out of the box, is not present. Neither in L2S nor in the EF. It’s unacceptable for me in the sense that the whole world is now gravitating around multi-layered applications and any ORM or DAL system should enable this scenario (No out-of-the-box story!).

EF appears to me to be closer to a Microsoft multi-tiered implementation than LINQ to SQL because it serializes complete object graphs with the updated SP1 DataContractSerializer (DCS). Danny Simmons demonstrated the feasibility of a multi-tier EF with the Perseus project and its EntityBag. The question now is whether Danny intends to rearchitect Perseus with DCS or stick with EntityBag.

Added: May 24, 2008

Dinesh Kulkarni on Object Tracking and LINQ to SQL DataContext Lifetime

Dinesh explains that LINQ to SQL's object (instance) tracking feature is intended to prevent entities returned by successive queries from "stomping" on cached entity values. In his LINQ to SQL Tips 6: How to refresh given DataContext won't stomp on your objects post of May 23, 2008, Dinesh notes that you can overwrite the current values of one or more specified entities with the DataContext.Refresh method. However, he cautions that "the changes in the database for a given query can be:

    1. Newly inserted objects
    2. Updates of existing objects
    3. Deleted objects that were present in a previous execution of the same query

Issuing the same query with the same DataContext takes care of the first. Refresh() can handle #2. But #3 requires a little more thought and computation. You could certainly use another DataContext to compare results."

The issue resolves to selecting the appropriate DataContext lifetime, as recommended in his Lifetime of a LINQ to SQL DataContext post of April 27, 2008. If your application is stateful, consider separate DataContexts for online transaction processing (OLTP) and reference data. Dinesh's recommendations also apply to projects that use the Entity Framework.

Added: May 24, 2008

Rob Conery Completes MVC Storefront Parts 11 and 12 with Moq and Jimmy Bogard Proposes an nHibernate Fork 

Rob's MVC Storefront, Part 11: Hooking Up The Shopping Cart And Components and MVC Storefront, Part 12: Mocking of May 23, 2008 continue the MVC Storefront saga. Part 12 uses Moq (a.k.a. LINQ for Mocks) to mock the repository's authentication data (Email, UserID, and Password).

Rob acknowledges in Part 12 Jimmy Bogard's proposal in The MVC Storefront Challenge! post of May 20, 2008 to fork the code with nHibernate replacing LINQ to SQL. The comments include responses from several potential volunteers to help with the coding.

Added: May 24, 2008

Test Google Sites LINQ and Entity Framework Wiki Started

I needed a place to catalog links to LINQ and Entity Framework resources, such as magazine articles, online help pages, and blog posts, that aren't date-sensitive. Google Sites opened as a free service to the public this week, so I set up a LINQ-EF site with pages of "announcements" for LINQ and EF-related topics. The LINQ-EF site isn't meant to compete with Troy Magennis's Hooked on LINQ Wiki; it doesn't include any original content.

Google Sites is based on the JotSpot model but with many advanced JotSpot features missing. (Google acquired JotSpot in late October 2006.) It's simple to set up and navigate, and it substitutes an HTML editor for the arcane markup used by many wikis. It doesn't yet integrate with other Google Apps. It's certainly not the "SharePoint" killer that some bloggers claim, but it's probably good enough for my current needs.

Added: May 24, 2008

Dates, Times and Codes Added to Most Tech*Ed LINQ and Entity Framework Sessions

The LINQ and Entity Framework Breakout and TLC Sessions at Tech*Ed Developers 2008 post was updated May 23, 2008 to include date, time and code data from the ADO.NET Team's Going to TechEd? Drop by and say Hi! blog of the same date.

Apparently, only Tech*Ed 2008 Developer attendees have access to this added data.

Added: May 24, 2008

Has LINQ to SQL Reached Legacy Status Less than Three Months after Launch?

LINQ to SQL was the only new data-access implementation to be included in Visual Studio 2008 when it "launched" with SQL Server 2008 and Windows Server 2008 in a series of "Heroes Happen Here" extravaganzas that started on February 27, 2008.

Judging from my Is the ADO.NET Team Abandoning LINQ to SQL? post of May 21, 2008, Microsoft appears to have ceased further development of LINQ to SQL, based on the lack of new and promised features in the LINQ to SQL SP1 Beta.

Repeated from: LINQ and Entity Framework Posts for 5/19/2008+

Updated 5/23/2008 with a response to a comment from Andres Aguiar and Julie Lerman's Damien Guard joins the LINQ to SQL team as a developer post of the same date.

Quick Links to VS 2008 SP1 Beta Docs

My VS 2008 and .NET Framework 3.5 SP1 Beta Documentation and Forum Links of May 22, 2008 has links to LINQ, Entity Framework and related topics in the unsearchable (and unindexed) MSDN Library.

Marcin Dobosz on Customizing ASP.NET Dynamic Data Validation Metadata

Marcin's Dynamic Data samples: Custom metadata providers post of May 23, 2008 explains how to "programmatically add [data validation] metadata attributes to an in-memory store before you register your model with the Dynamic Data runtime in Global.asax." This sample replaces the XML-based metadata provider for the December 2007 CTP.

His earlier Dynamic Data samples post contains a list of the current and forthcoming ASP.NET Dynamic Data samples. (I added a "Where's the beef?" comment to this post.)

A Solution for the KB944899 Problem When Attempting to Install VS 2008 SP1 Beta

Wally McClure found the Visual Studio 2008 Hotfix Cleanup Utility on the MSDN Code Gallery. This small *.exe file removes KB944899, if present, and removes the registry keys that cause the problem.

Matt Manela Explains LINQ to SQL's Optimistic Concurrency Management Features

In his Intro to LINQ to SQL Optimistic Concurrency post of May 22, 2008, Matt explains the significance of the UpdateCheck.Always, UpdateCheck.Never, and UpdateCheck.WhenChanged properties when managing updates with optimistic concurrency conflicts.

Scott Allen Analyzes Rob Conery's Problems with LINQ to SQL Lazy Loading

Scott left a comment to my "Rob Conery Runs into a LINQ to SQL Corner with his Repository Model" topic of LINQ and Entity Framework Posts for 5/19/2008+ that Rob's conclusion it was LINQ to SQL's fault: "I'd say that requires more investigation. Doesn't sound correct."

His Rob's Not So Lazy MVC Storefront post of May 21, 2008 uncovers the real culprit, a type conversion of the IList<Product> property.

Kevin Lewis Rewrites His UPS Webservice Rate Calculator with LINQ to XML and VB Literals

His LINQ to UPS to Calculate Shipping Rates post of May 22, 2008 contains the full source code for his updated GetShippingMethodsFromWeb function.

Samir Bajaj Demonstrates How to Use LINQ to SQL with Table per Type Inheritance

From the How Did I Miss That? department: Back on April 2, 2008, Samir posted TPT with LINQ to SQL on his MSDN blog that I wasn't tracking at the time. He discusses the three common mapping strategies for object hierarchies: Table per Hierarchy (TPH), Type per Type (TPT) and Table per Concrete Type (TPCT). LINQ to SQL has out-of-the-box support for TPH only. But Samir demonstrates that you can map a TPT hierarchy "using the built-in TPH support and a bit of T-SQL code."

The sample code is available here: TPT with LINQ to SQL.

Marco De Sanctis Asserts That It's Not Always a Wise Choice to Eager-Load Associated Entities in LINQ to SQL Projects

Most developers using LINQ to SQL as the data layer eager-load associated entities to minimize round trips to the database. In When Lazy Loading associations is useful of May 22, 2008, Marco describes two scenarios where lazy loading may be beneficial.

Marco De Sanctis Wraps LINQ to SQL's Data Context in a Generic Unit of Work Instance for Caching by ASP.NET

His Linq To Sql in real word Web applications post of May 20, 2008 shows you how to wrap LINQ to SQL's Data Context in a generic Unit of Work instance to emulate nHibernate's SessionPerConversation pattern. His post includes a link to download the sample code.

Friday, May 23, 2008

LINQ and Entity Framework Breakout and TLC Sessions at Tech*Ed Developers 2008

This list was compiled from the Tech*Ed Developers 2008 Session Catalog with LINQ or ADO.NET as the Keyword.

Updated May 23, 2008 with date, time and code data from the ADO.NET Team's Going to TechEd? Drop by and say Hi! blog of the same date.

Breakout Sessions

Updated May 9, 2008: Added Julie Lerman's Advanced Entity Framework: Take Charge of Object Services session omitted accidentally. There are 19 LINQ, LINQ-related, and Entity Framework breakout sessions.

LINQ

LINQ to DataSet

Date: June 6 Time: 4:30pm-5:45pm Code: TA677 
Track: Database Platform Presenter: Erick Thompson Level: 300

Microsoft Visual Studio 2008 introduces a number of new technologies that make working with data a better experience. One of these new technologies is Language Integrated Query (LINQ). The LINQ to DataSet flavor of LINQ gives you the ability to leverage the power of LINQ in your DataSet based applications. This session demonstrates how you can use LINQ to DataSet to improve the performance and reliability of your existing code, as well as utilize new functionality.

XML LINQ: Linking in the Real World

Date: Time: Code:
Track: Developer Tools and Languages Presenter: Paul Sheriff Level: 300

LINQ technology in .NET 3.5 has some great hooks into XML that make using XML documents a breeze. This seminar explores how you will put this technology to work in your applications. Besides the obvious advantages of using LINQ to iterate over XML data, you can also use it to create and process XML documents. One great way you can use XML is in prototyping. In this seminar, see how to use LINQ and XML to create faster prototypes for your customers.

Microsoft Visual Basic 2008: Microsoft LINQ Language Tips, Tricks, and Best Practices

Date: Time: Code:
Track: Developer Tools and Languages Presenter: Amanda Silver Level: 300

LINQ (Language Integrated Query) is a key platform innovation introduced with Microsoft Visual Studio 2008, which brings SQL-style query expressions into Visual Basic and Visual C#, enabling you to describe what data to reason about instead of how to access the data. In this session, by taking a much closer look at the language features that enable LINQ-enabled frameworks, we uncover tips, tricks, gotchas and best practices for writing queries that will help you write robust, high-performing, maintainable business applications more quickly. In addition to gaining a solid understanding of LINQ for data access, you’ll also leave this session with a clear understanding of how query and the individual language features can be leveraged in other parts of your application to write less code.

Super-Optimized Microsoft LINQ: Indexed Objects

Date: Time: Code:
Track: Developer Tools and Languages Presenter: Aaron Erickson Level: 300

LINQ (Language Integrated Query) is a key platform innovation introduced with Microsoft Visual Studio 2008, which brings SQL-style query expressions into Visual Basic and Visual C#, enabling you to describe what data to reason about instead of how to access the data. In this session, by taking a much closer look at the language features that enable LINQ-enabled frameworks, we uncover tips, tricks, gotchas and best practices for writing queries that will help you write robust, high-performing, maintainable business applications more quickly. In addition to gaining a solid understanding of LINQ for data access, you’ll also leave this session with a clear understanding of how query and the individual language features can be leveraged in other parts of your application to write less code.

How LINQ Works: A Deep Dive into the Implementation of LINQ

Date: Time: Code:
Track: Developer Tools and Languages Presenter: Aaron Erickson Level: 400

Want to know what really happens when you execute your favorite LINQ queries? Curious how the same query expression can target either in-memory data or relational data? In this 400-level talk, Alex Turner, the C# Compiler Program Manager, uses Reflector and other tools to reveal exactly how the compiler translates LINQ query expressions. Gain a deeper understanding of LINQ’s functional roots as we see how lambda expressions and iterator methods enable LINQ to Objects' elegant syntax. Then find out what's the same and what's radically different as we explore LINQ to SQL and the expression trees that make it tick.

Real-World LINQ to SQL

Date: June 3 Time: 1:15pm-2:30pm Code: TC19F
Track: Developer Tools and Languages Presenter: Anthony Sneed Level: 400

Take a deep dive into a real-world LINQ to SQL application that seeks to exploit the full capabilities of the object-relational mapping technology released with Microsoft .NET Framework 3.5 and Microsoft Visual Studio 2008. This talk focuses on best practices for incorporating LINQ to SQL into your data-driven Windows Forms or Windows Presentation Foundation application, including the use of eager loading, pass-through SQL, batch updating with stored procedures, concurrency control, and disconnected scenarios. We also address object caching and identity issues, as well as support for distributed transactions.

Parallelize Your Microsoft .NET Framework-Based Applications with Parallel Extensions

Date: Time: Code:
Track: Development Practices Presenter: Steven Toub Level: 300

With the Microsoft .NET Framework today, correctly introducing concurrency into libraries and applications is difficult, time consuming, and error-prone. However, as the hardware industry shifts towards multi-core and manycore processors, the key to high-performance applications is parallelism. Parallel Extensions to the .NET Framework offers solutions to help make writing concurrent applications significantly easier. In this session, we dive into Parallel Extensions, exploring Parallel LINQ-to-Objects (PLINQ), the Task Parallel Library (TPL), the underlying concurrency runtime, and more, in order to provide an in-depth look at the next generation of parallel programming with .NET.

Introduction to Mock Objects and Advanced Unit Testing

Date: Time: Code:
Track: Development Practices Presenter: Roy Osherove Level: 300

If you've played around with Unit testing but are not sure what the deal is with Mock Objects, Stubs and the like, this talk is for you. We cover, among others: what Mocks and Stubs are, hand-written mocks and stubs, dynamic mock objects using Rhino Mocks and Typemock, dependency injection techniques for Mocks and Stubs, and more; and how to mock out LINQ Queries and extensions methods.

Use the Open XML SDK and LINQ to Program the Microsoft Office Open XML File Formats

Date: Time: Code:
Track: Office and SharePoint Presenter: Ken Getz Level: 300

Although the Packaging API makes it possible to manipulate the Office Open XML Formats directly, it doesn’t make it easy. The Open XML SDK provides a consistent and neat wrapper around the API, making it far easier to get to the parts you need. Once you get to the part, however, you’re still simply working with XML content. To make this easier, LINQ to XML provides a superb tool. Both Microsoft Visual C# and Visual Basic provide support for LINQ to XML, and Visual Basic adds specific features that make the process far easier. In this session, see how to use the Open XML SDK and LINQ to XML to manipulate Open XML File Formats. Special attention is paid to the issues involved in handling namespace resolution, a tricky issue in any situation.

Integrating Windows Presentation Foundation and Windows Communication Foundation into Your Office Business Applications 

Date: Time: Code:
Track: Office and SharePoint Presenter: Tim Huckaby Level: 400

This session highlights many of the ways that the Windows Presentation Foundation (WPF) and the Windows Communication Foundation (WCF) can be leveraged in applications built with Visual Studio Tools for the Microsoft Office System (VSTO). Visual Studio 2008 introduced an array of new features aimed at a wide range of Office solution types. With Visual Studio 2008, you can build solutions that incorporate the native capabilities of the Office client applications (like Outlook) combined with the sophisticated UI capabilities of WPF that's connected to remote data and services via WCF and use the RAD features of LINQ to manipulate that data. These new technologies provide opportunities for building powerful solutions with functionality that was previously difficult or impossible to achieve. Now that Microsoft Office has evolved into a true development platform, solutions based on Office are becoming increasingly sophisticated, less document-focused, and more loosely coupled. This session shows you how easy it is to build robust solutions that leverage the latest technologies. WPF provides developers and designers with a unified programming model for building rich Windows smart client user experiences with Office client applications that incorporate UI, media, and documents. WCF contains a support framework and a design-time toolset for building service-oriented solutions that connect rich Office clients with powerful server-side functionality and remote data access. Visual Studio 2008 provides a simple GUI wizard that lets you consume WCF services without having to worry about service metadata, protocols, or XML configuration.

Jumpstart Data Driven Web Applications with ASP.NET 3.5 (Part 1 of 2)

Date: Time: Code:
Track: Web and User Experience Presenter: Scott Hanselman Level: 200

Explore the new features in ASP.NET 3.5 that make buliding data driven Web applications a breeze. In this first of a two-part series, learn how to use LINQ to take the pain out of interacting with your relational data and how support for LINQ and its constructs are built into the paradigms you are familiar with in ASP.NET and Microsoft Visual Studio 2008.

Using Data and Web Services in Your Microsoft Silverlight Application

Date: Time: Code:
Track: Web and User Experience Presenter: Hamid Mahmood Level: 300

This session covers how to use data in your Silverlight beta 1 application. Learn how to get the data (in brief… networking is well covered in other talks), how to manipulate the data (LINQ/XLINQ), how to bind the data (Databinding), how to show the data (dive into a few data relevant controls, notably Datagrid), how to validate the data, and how to store the data (isolated storage).

Building Rich Internet Applications Using Microsoft Silverlight 2 (Part 2 of 2)

Date: Time: Code:
Track: Web and User Experience Presenter: Mark Rideout Level: 300

Silverlight provides a powerful platform for building the next generation of rich interactive applications on the Internet. In this session, we demonstrate building a rich interactive application (RIA) using Silverlight and Microsoft .NET. We cover how to use Microsoft Visual Studio to create applications, how to create UI using XAML markup and code, how to build a custom control, how to retrieve data from a Web service, and how to manipulate data with XML and LINQ.

An Introduction to LINQ on Devices

Date: Time: Code:
Track: Windows Mobile Presenter: Dan Fergus Level: 300

We’ve all heard the hype, now let’s look at the reality. There are some great things about LINQ, some of which are not supported on devices. But there is much to learn to begin using LINQ effectively. The first is to know what exactly it is and what it can do for you. With a firm foundation, we then look at how to implement LINQ and discuss how it can be implemented.

Entity Framework

Understanding the ADO.NET Entity Framework

Date: June 6 Time: 4:30pm-5:45pm  Code: TA677
Track: Developer Tools and Languages Presenter: Erick Thompson Level: 300

Most Microsoft .NET Framework-based database applications out there use ADO.NET to access and manipulate data, and most of them have a data-access layer built on top of ADO.NET to abstract out many of the details related to data-access that can get in the way of business logic. In this session, we introduce the ADO.NET Entity Framework, a high-level data library that pushes up the level of abstraction application developers need to work at when dealing with data in databases. We discuss how the system supports conceptual modeling, the use of the object services layer to do object-relational mapping, and how great integration with LINQ (Language Integrated Query) brings new levels of productivity to the data-access development space.

Microsoft .NET Framework 3.5 Data Access Guidance

Date: June 5  Time: 2:45pm-4:00pm Code: T276B
Track: Developer Tools and Languages Presenter: Julie Lerman Level: 300

With .NET 3.5, developers now have to choose between “classic” ADO.NET, LINQ to SQL, and a number of options using Entity Framework. The ADO.NET 3.5 Entity Framework presents us with a slew of new options for accessing data which you will learn about during this conference. This session compares and contrasts DataSets and DataReaders, Object Services and Entity Client; Entity SQL, LINQ to Entities and LINQ to SQL, providing guidance as to which methods are appropriate in particular scenarios. We also examine this functionality with respect to both creating new solutions and plugging the Entity Framework into existing applications.

Advanced Entity Framework: Take Charge of Object Services

Date: June 5 Time: 10:15am-11:30am Code: T7D80
Track: Developer Tools and Languages Presenter: Julie Lerman Level: 300

The Entity Framework combined with the Entity Data Model (EDM) bring data access to a new level in Enterprise Applications. Entity Framework Object Services APIs, while providing a lot of automated functionality, are filled with features that give developers much more control over how objects are handled. The most important jobs of the ObjectContext are relationship management and change tracking. This session drills into how the ObjectContext manages relationships and how you can control its behavior. This is especially important in SOA scenarios where you may need to transport ObjectGraphs. We also look closely at change tracking, focusing on the challenges and solutions for dealing with data concurrency when moving objects across tiers in your enterprise applications. Knowing what to expect from these features and how to take control of them will empower you in your use of the Entity Framework and EDMs in your Web sites, SOA applications, and smart clients, as well as other applications that share the EDM.

Added: May 9, 2008

Building Next Generation Data Access Layers with the ADO.NET Entity Framework

Date: June 3 Time: 4:45pm-6:00pm          Code: ARC305
Date: June 5 Time: 2:45pm-4:00pm          Code: ARC305R
Track: Architecture Presenter: Barry Gervin Level: 300

As Developers, we've been building components in our data access layer (DAL) with ADO.NET classes such as Connections, Commands, DataReaders, DataSets and our own custom Helper classes and Data Classes. We build data access layers with a clear separation of concerns between business logic, data access, and data storage. We do this to increase cohesion and maintainability of our code, and also to increase developer productivity. What does this exactly mean in terms of the Entity Framework? What is the best approach to using the Entity Framework within our Data Access Layer? There are several workable models for leveraging the Entity Definition Model (EDM) within our applications. On one end of the spectrum, we can use the Entity Definition Model as a tactical tool for data access which is isolated to our Data Access Layer. This hides the Entity Framework from the rest of our application, effectively separating the concern of data access from the rest of our application. Another technique includes leveraging the conceptual Entity Definition Model deeply throughout our solution's layers and tiers. In this session, we compare and contrast these approaches including the middle ground, and see how these architectural choices affect maintainability, readability, and developer productivity. Most developers don’t frequently have the opportunity to start from a fresh slate, so we’ll also examine a refactored evolution from traditional data access layers through to incremental use of the Entity Definition Model.

ADO.NET Entity Framework: Application Patterns

Date: June 6    Time: 10:15am-11:30am Code: T34C4
Track: Development Practices Presenter: Shyam Pather  Level: 300

Microsoft is introducing the ADO.NET Entity Framework and the Entity Data Model to help developers work at the right level of abstraction when creating business applications, and let the system worry about the details on how to deal with the underlying database. Like any new technology, most of the information available on the topic focuses on what the Entity Framework is, what are its constituting components and related aspects. There is a need for information on how to actually apply the technology to solve concrete problems in various application scenarios. This session discusses application patterns for the Entity Framework in each of the major application models such as Web applications, SOA-style systems, and data-centric services.

Technical Learning Center (TLC) Sessions

There are three TLC sessions.

LINQ to XML: Plumbing the Depths

Date: June 6 Time: 2:45pm-4:00pm Code: T4398
Track: Developer Tools and Languages Presenter: Shyam Pather  Level: 300

This session provides you the opportunity to expand your knowledge of LINQ to XML. XML permeates the world of data, from content to formatting to services. LINQ to XML is a new way to query this ubiquitous data format using the power of Language Integrated Query (LINQ). LINQ to XML provides both DOM and XQuery/XPath-like functionality, all from within your source code. Additionally, Microsoft Visual Basic 9.0 adds XML as a built-in data type and uses LINQ to XML to allow developers to write what they intend, without compromising best practices. This session explores these capabilities, and shows how LINQ can improve your code and its reliability.

LINQ to XML, SQL, Entities, DataSets, and Co: Data Access Technologies Explained

Date: June 5 Time: 1:00pm-2:15pm Code: T8808
Track: Developer Tools and Languages Presenter: Shyam Pather  Level: 300

With the release of the Microsoft .NET Framework 3.5, Microsoft introduced several new data access technologies based on its LINQ technology, such as LINQ to SQL and LINQ to DataSets. Shortly after, we expect Microsoft to release the ADO.NET Entity Framework which enables LINQ to Entities in addition to Entity SQL. Finally, we have all the existing ADO.NET data access patterns. This raises one important question: Which data access technology is best suited for which situation? In this session we look at different scenarios and requirements that can inform your technology decision.

Using LINQ, the ADO.NET Entity Framework and ADO.NET Data Services with Third Party Databases

Date: June 4 Time: 2:45pm-4:00pm Code: TCD2B
Track: Windows and Frameworks Presenter: David Sceppa  Level: 300

The ADO.NET Entity Framework extends the existing ADO.NET provider model to allow provider writers to make their data stores available through the Entity Framework. This model allows developers to execute store agnostic queries against their data stores using LINQ, Entity SQL or ADO.NET Data Services. Provider writers will be in attendance at this Interactive Theater presentation to talk about their plans to support the Entity Framework and demonstrate their current bits.

Is the ADO.NET Team Abandoning LINQ to SQL?

Updated 5/23/2008 at the end of the post.

Danny Simmons' Why use the Entity Framework? post includes an "Entity Framework vs. LINQ to SQL" topic that lists the following advantages of Entity Framework (EF) over LINQ to SQL:

  • Full provider model with support for multiple RDBMSs, including SQL Server Compact.
  • Not tied to a one:one relationship between entities and database tables.
  • Support for Table per Class and Table per Concrete Class hierarchy models.
  • Support for entity-splitting and complex types (also called value types)

Missing from this list are, for starters:

  • Default support for serializing complete object graphs.
  • An out-of-the-box multi-tier story for SP1.
  • Support for SQL Server Compact 3.5 SP1 in the Object/Relational Designer.

I had expected LINQ to SQL SP1 to support bidirectional serialization for WCF service applications with SP1's updated DataContractSerializer. However, the Object/Relational Designer's Serialization property still has None and Unidirectional options only. This fix would have taken minimal development and test time. You can accomplish this yourself but refreshing the data model requires adding [DataMember] attributes by hand to Association classes that create cyclic references.

LINQ to SQL has a much lighter footprint than EF, which makes it a better match for applications that use SQL Server Compact (SSCE) 3.5 SP1 and later. Support for SSCE by SqlMetal.exe arrived just in time for VS 2008 RTM but not by the designer. Surely there was plenty of time between VS 2008 RTM and SP1 Beta to work out this fix.

I also was looking forward to an early version of the mini connectionless DataContext that Matt Warren promised, as noted in my Changes Coming to LINQ for SQL post of just less than a year ago.

Compare LINQ to SQL SP1's New Features with Other ADO.NET Members

According to the ADO.NET Team's What's New in the SP1 Beta for LINQ to SQL? post of May 14, 2008, the following tweaks are what's new:

Across the LINQ to SQL we have made numerous bug fixes, better SQL translation for queries comparing nullable columns in Visual Basic, and support both in the runtime and the designer for SQL Server 2008.

New SQL Server 2008 Support includes:

  • Support for connecting to SQL Server 2008 databases in Server Explorer
  • Drag & drop tables in SQL Server 2008 databases from Server Explorer
  • Support for the following new types: Date, Time, DateTime2, DateTimeOffset, Filestream

SqlClient class members contain the majority of SQL Server 2008 support modifications and the SqlClient update is required to deliver Katmai support for SqlDataReader 3.5 across the entire Microsoft product line.

EF and the Entity Data Model Designer received a raft of new and improved features, as did ADO.NET Data Services (Astoria), which turned into a framework between November 2007 and May 2008. Astoria currently is staffing up for v2, as evidenced by their Interested in working on the ADO.NET Data Services Framework (aka "Astoria") or XML? post of May 17, 2008.

It's obvious to me that only trivial resources were devoted to LINQ to SQL in the post-RTM period.

Is LINQ to SQL a Legacy Data Layer?

If Microsoft intends to end-of-life LINQ to SQL, the ADO.NET team should notify .NET developers. In the meantime, I'm adding the following caveat to my reasons to choose EF over LINQ to SQL:

  • Entity Framework is Microsoft's strategic data access layer. LINQ to SQL has [almost | already] gained legacy status due to lack of attention from the Data Programmability group.

Update May 23, 2008: Andres Aguiar agreed with my conclusion in his comment to this post, but stated:

The Data Programmability Team never owned LinQ to SQL, it was owned by the C# team. That's why we have two O/R mappers, both teams wanted to ship theirs.

The Data Programmability team gained ownership of LINQ to SQL from the C# team about the time that Tim Mallalieu of SQL-DP took over program management from Dinesh Kulkarni, as Dinesh mentioned in his October 15, 2007 LINQ to SQL: What is NOT in RTM (V1) swansong from the LINQ to SQL team. (That's the post containing the source of the no "out-of-the-box multi-tier story" quote above.)

Tim doesn't qualify as a "great communicator." The last post to his blog was Databinding with ADO.NET Entity Framework is dated November 11, 2006. According to his LinkedIn profile, he's still employed by Microsoft as a Lead Program Manager.

Julie Lerman's Demurrer

Julie disagrees in her Damien Guard joins the LINQ to SQL team as a developer post of May 23, 2008. She says, "I have even seen suggestions that LINQ to SQL was intentionally cobbled and done so for political, not technical reasons." Me, too.

Matt Warren, the outspoken architect of LINQ to SQL, says in his Mocks Nix - An Extensible LINQ to SQL DataContext post of May 4, 2008:

LINQ to SQL was actually designed to be host to more types of back-ends than just SQL server. It had a provider model targeted for RTM, but was disabled before the release. Don’t ask me why. Be satisfied to know that is was not a technical reason. Internally, it still behaves that way. The trick is to find out how to swap in a new one when everything from the language to the runtime wants to keep you from doing it. [Emphasis added.]

(Matt gained his reputation for "telling it like it is" with his The Origin of LINQ to SQL post of May 31, 2007 which recounted the demise of ObjectSpaces in the black hole of WinFS and described his three years after the event as a "political nightmare.")

Julie interprets the hiring of Damien Guard by the ADO.NET Team as "an indication that the product will continue to evolve." I'm not so sure; Damien might have been hired to replace a dev lost to turnover in the ranks. The real money's being spent on the Entity Framework and its chief client, ADO.NET Data Services.

My thanks go to Julie for describing the original version of this post as a "deeply analytical blog post." For whatever it's worth, IANAL (I am not a lawyer) nor do I have any interest in being (or imitating) one. ;-) Full disclosure: I was a draftee on a Federal Grand Jury for a year and a half some time ago. :-(.

Thursday, May 22, 2008

VS 2008 and .NET Framework 3.5 SP1 Beta Documentation and Forum Links

The VS 2008 and .NET Framework 3.5 SP1 Beta documentation isn't searchable (for reasons known only to the Developer Division.) Mike Tulty provided some initial links in his VS 2008 Service Pack 1 - Docs and Installation post, which are included here. Following are links to additional topics related to LINQ and the Entity Framework, including (for convenience) links to forums.

ADO.NET

ASP.NET

SP1 [Beta]

Wednesday, May 21, 2008

LINQ and Entity Framework Posts for 5/19/2008+

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

Has LINQ to SQL Reached Legacy Status Less than Three Months after Launch?

LINQ to SQL was the only new data-access implementation to be included in Visual Studio 2008 when it "launched" with SQL Server 2008 and Windows Server 2008 in a series of "Heroes Happen Here" extravaganzas that started on February 27, 2008.

Judging from my Is the ADO.NET Team Abandoning LINQ to SQL? post of May 21, 2008, Microsoft appears to have ceased further development of LINQ to SQL, based on the lack of new and promised features in the LINQ to SQL SP1 Beta.

Added: May 21, 2008

Francois Vanderseypen Offers a Well-Documented Demo of a Web Client Software Factory Project that uses WCF, WF and LINQ to SQL

His Frameworks and directions (Kyiv presentation, May 2008) post of May 19, 2008 includes a link to download a large-scale Northwind Factory v.2.1 sample project that combines the Web Client Software Factory (WCSF) from CodePlex with LINQ to SQL, Windows Communication Foundation, and Workflow Foundation. The project, which builds a complete multi-tiered, Model-View-Controller (MVC) pattered Web site, includes a 26-page illustrated NorthwindFactory.docx documentation file. NorthwindFactory.docx is the last file in the .zip archive.

Francois's later Linq to SQL and Workflows post of May 21, 2008, casts doubt on the compatibility of LINQ to SQL data layers with the Workflow Foundation and raises other commonly blogged LINQ to SQL issues. He concludes:

All this leads somehow to the conclusion that [LINQ to SQL] was really not designed well to fit with the rest of the .Net 3.5 framework. Great idea, but not too well implemented. Let’s hope the final release of the Entity Framework (around [A]ugust with .Net 3.5 SP1) will bring some cures.

Francois works for Materialise Dental NV in Leuven, Belgum, the developer of "a range of products and services to aid dental specialists in the treatment of their patients," including "the SimPlant range of solutions for Computer Guided Implantology."

Added: May 21, 2008

Randolph Cabral Adds Business Entity Classes to His N-Tier LINQ to SQL Project

In Exploring N-Tier Architecture with LINQ to SQL (Part 4 of n) of May 21, 2008, Randolph "attempt[s] to build out the domain model and use it in our web UI layer to demonstrate how we could interact with the business entities."

Added: May 21, 2008

Ben Hall Recommends When and How to Use Stored Procedures vs. User-Defined Functions with LINQ to SQL

Ben's Linq to SQL Stored procedure vs Functions post of May 21, 2008 provides a detailed analysis of when to substitute user-defined functions (UDFs) for stored procedures in LINQ to SQL data-access scenarios.

Added: May 21, 2008

ASP.NET Dynamic Data Website Wizard Gets Major Overhaul in May 20 Update

Scott Hunter's May 20th Refresh of Dynamic Data is now Available post to the ASP.NET Forums of May 21, 2008 lists 11 significant changes to the Dynamic Data Website Wizard. An important upgrade is replacing details, edit, and insert ListView with FormView controls.

The Dynamic Data Runtime gets a few bug fixes, as well as UI and validation tweaks.

You can download the Dynamic Data Runtime and Templates from the MSDN Code gallery.

Added: May 21, 2008

Frans Bouma Red-Flags VB's Aggregate LINQ Reserved Word

According to his VB.NET: Beware of the 'Aggregate' keyword (updated) post of May 21, 2008, executing

Dim max = Aggregate o in metaData.Order Into m=Max(o.EmployeeID)

returns all Order entities and executes the Max() aggregate in the client's memory. Surprisingly, Frans reports in his update that the problem doesn't occur with DateTime or String values.

Added: May 21, 2008

Dean Whittaker Explains How to Use LINQ to SQL's DataContext Object to Recreate Test Databases

It's a common practice to mock database operations when using Test-Driven Development (TDD) to improve performance. If you don't mock the database, it's a good practice to recreate it each time your unit tests run to update it.

Dean Whittaker shows you how to do this in his Using Linq's DataContext to (re)create your database for testing post of May 21, 2008.

Added: May 21, 2008

Mike Taulty Extend's Julie Lerman's Analysis of EF Query Execution to LINQ to SQL

Mike's "When Do Queries Execute" post of May 21, 2008 extends Julie's discovery that stored procedures execute when invoked with ExecuteMethodCall() rather than when the data is needed (see below) to LINQ to SQL queries.

However, LINQ to SQL queries that invoke table-valued functions do so with CreateMethodCall(), which defers data retrieval until the data is required.

Added: May 21, 2008

Aaron Skonnard Describes the .NET 3.5 SP1 DataContractSerializer's New POCO and Cycle Capabilities

The Windows Communication Foundation (WCF) Data Contract Serializer (DCS) has two important new capbilities:

  1. Capability to serialize complete object graphs with associations that create cyclic references (a.k.a. bidirectional serialization or cycles) for services without a hack.
  2. Capability to serialize plain old CLR objects (POCOs) by removing the requirement to decorate classes with [DataContract] and [DataMember] attributes.

Aaron Skonnard takes on #1 in his DataContracts and object references post of May 14, 2008 and #2 in his detailed DataContracts without attributes (POCO support) in .NET 3.5 SP1 post of May 13, 2008. I missed Aaron's posts due to the activity surrounding release of .NET 3.5/VS 2008 SP1 Beta.

Prior to SP1, you could enable serializing graphs with cycles by setting the PreserveObjectReferences argument to true in the DCS's constructor. (Failing to do this raises an exception when the DCS encounters a cycle in the source object.)

However, you can't enable this option directly when you use the DCS with WCF in a service operation. Instead, you need to subclass DataContractSerializerOperationBehavior and override the CreateSerializer() method with the code described in Sowmy Srinivasan's seminal Preserving Object Reference in WCF post of March 26, 2006.

My LINQ to SQL and Entity Framework XML Serialization Issues with WCF - Part 1 post of October 9, 2007 and Serializing Cyclic LINQ to SQL References with WCF of October 30, 2007 cover issues with cycles in LINQ to SQL, which also apply to the Entity Data Model.

The latter post quotes a response to the System.ServiceModel.CommunicationException - The socket connection was aborted... question in the WCF forum by Microsoft's Ed Pinto:

Please be aware that there is no interop story for the preservation of object references.

I observed that "[t]he rumor is that Microsoft deliberately made it difficult to set this attribute value to discourage non-interoperable bidirectional serialization scenarios." It will be interesting to see if Microsoft has come up with an interop story to accompany SP1.

Added: May 21, 2008

Danny Simmons Updates Entity Framework FAQs

His New in version 0.5 of the FAQ… post of May 21, 2008 provides links to:

Added: May 21, 2008

Igor Ostrovsky Offers Seven Unusual Uses for LINQ to Objects

Igor is an infrequent poster but his 7 tricks to simplify your programs with LINQ entry of May 18, 2008 contains the following interesting examples:

  • Initialize an array
  • Iterate over multiple arrays in a single loop
  • Generate a random sequence
  • Generate a string
  • Convert sequences or collections
  • Convert a value to a sequence of length 1
  • Iterate over all subsets of a sequence

Thanks to Scott Guthrie for the heads-up.

Added: May 21, 2008

Matthieu Mezil Offers an Illustrated Introduction to Entity Framework with Advanced Topics

Matthieu's Entity Data Model Mapping: Beyond the Basics article for DataDeveloper.net starts by creating the requisite Northwind Entity Data Model with the Wizard, but then goes on to cover:

  • Many to many relationships
  • Entity splitting
  • Mapping with added conditions
  • Table Per Type (TPT) inheritance
  • Table Per Hierarchy (TPH) inheritance
  • Complex types
  • Create/update/delete SSDL functions
  • The SELECT SSDL function
  • Performing database operations based on views

Added: May 21, 2008

Matt Berseth AJAXifies the DetailsView of a Master/Details Web Form

Regardless of whether the page's DataGrid and DetailsView controls' data source is an ObjectDataSource, LinqDataSource or EntityDataSource, the AJAX Control Toolkit's ModalPopup with a DetailsView on an UpdatePanel improves the data editing experience.

Matt's Master-Detail with the GridView, DetailsView and ModalPopup Controls post of April 29, 2008 updates his prior version with a spiffed-up page design and now emulates saving changes to the back-end tables. Source code is available for download, and it's not much work to substitute a LinqDataSource or EntityDataSource for the ObjectDataSource.

Click here for a live demo.

If you're interested in AJAXifying DataGrids, read Matt's 7 simple steps to ajax-enable your ASP GridView

Thanks again to Scott Guthrie for the heads-up.

Added: May 21, 2008

Agnes Molnar Continues Her LINQ4SP Demonstrations

Hungarian SharePoint MVP Agnes Molnar (a.k.a. Aghy) shows her replacement for Bart DeSmet's LINQ to SharePoint implementation creating a lookup to a list in her LINQ4SP - How to create a new item with a lookup to another list? post of May 20, 2008. The post includes a link to a 02:30 silent screencast.

Ryan Hauert Updates an EF Three-Level Table per Hierarchy Entity with Stored Procs

Mapping ImportFunctions to stored procedures for updating base (Person) and inherited (Employee and Manager) types isn't a strictly intuitive process, so Ryan's Function Mapping with Inherited Types post of May 20, 2008 demonstrates the simplest approach, which is to create a single set of stored procedures for the base class and call them with wrapper functions in the SSDL file. A hitch in this process is that the wrapper functions are deleted each time you run the Update Database from Model operation.

Each wrapper changes the discriminator column value to conform to the level in the hierarchy, as discussed in the Re: Stored Procedures with Inheritance post of April 28, 2008 in the ADO.NET Entity Framework and LINQ to Entities (Prerelease) forum and David DeWitter's Entity Framework Stored Procedure Generation post of the same date..

Julie Lerman Discovers that EF Executes Stored Procs When Invoked, Not When Their Data is Needed

Her Command Execution of directly called ImportFunctions (stored procs) in Entity Framework post of May 20, 2008 explains the situation, which doesn't seem surprising to me.

ADO.NET Data Services to Add Replace Mode for Updates

In his Merge vs. Replace Semantics for Update Operations post of May 20, 2008, Pablo Castro announces that Astoria's current Merge update semantics will be complemented by a Replace option. Replace mode for the HTTP PUT method is required by the AtomPub spec.

The difference between the two modes is that Replace substitutes default property values for properties that aren't included in the uploaded message body's <Item> element, while Merge ignores missing properties. Missing links in Merge or Replace operations don't affect links on the server.

ADO.NET Team Offers Two New Entity Framework Web Casts

How Do I Get Started with the Entity Framework? (09:20)
In this introductory video, Alex James will show you how to build a simple Entity Data Model in a short amount of time.

How Do I Use the new EntityDataSource? (11:30)
In this introductory video Diego Vega will show you how to use the EntityDataSource in an ASP.NET Application.

SQL Server Compact 3.5 Runtime Bits Missing from VS 2008 SP1 Beta

SQL Server Compact 3.5 SP1 Beta and Synchronization Services for ADO.NET v1.0 SP1 Beta runtime bits didn't make it into the VS 2008 SP1 Beta package but you can download and install them from the preceding link.

Julie Lerman Takes on the Entity Framework Doubters

Julie posted this link to Bloglines citations of Danny's post in her Responses to Danny Simmons "Why Entity Framework" post of May 20, 2008.

Ironically, her post wasn't included in the Bloglines citation. (Several other cites in my Danny Simmons Answers the Frequently Asked Question: Why Use the Entity Framework? post were missing from Bloglines, too.)

Rob Conery Runs into a LINQ to SQL Corner with his Repository Model

He discovers "that if you set any Enumerable anything as a property, its Count property will be accessed when you load the parent object. This negates using any deferred loading for any POCOs, period." Yeah. That's run me nuts, too.

Update May 22, 2008: Scott Allen left a comment about Rob's preceding statement: "I'd say that requires more investigation. Doesn't sound correct." As it turns out, Scott did do some investigation and concluded that an IList<T> type change caused the overeager loading. See Rob's Not So Lazy MVC Storefront of 5/21/2008. 

Rob circumvents the problem by refactoring the MVC Storefront's Repository model, as described in his MVC Storefront: Intermission's Over, Made Some Changes post of May 19, 2008.

Update May 21, 2008: Rob clarifies the identity of his clients (the Microsoft ASP.NET team, the "community" and himself) in MVC Storefront: Client Progress Meeting of May 20, 2008, which details how the MVC Storefront project came to be at MIX 08 and his recent progress meeting with his boss, Shawn Burke.

Hopefully, it's time to go back to completing the code.

The SQL Server Data Service Team Breaks Their Silence

It's been a while since the last post from the SSDS folks. Soumitra Sengupta's What is going on at SQL Server Data Services of May 19, 2008 notes that SSDS is in the process of its second semi-monthly refresh after its introduction at MIX 08. Word on what new features, if any, the updates introduced will come some time after the refresh on May 20, 2008.

SSDS will be back in business by 9:00 AM on 5/21/2008.

SSDS documentation finally has been made public as the SQL Server Data Service Primer. The docs have some strange content, such as VS 2005 and .Net 3.0 being "recommended for Microsoft employees" to connect to SSDS. I recommend others use VS 2008 and .NET 3.5.

Update 5/21/2008: The SSDS team is Correcting an error in our documentation.

At MIX 07 the public beta was announced for July 2008. However, it's been pushed back two months to September 2008, according to Nigel Ellis's Introduction to New SQL Server Data Services: Web-Based Data Storage in a Cloud Web cast. I scheduled my Visual Studio Magazine article for the July issue to meet the original date; hopefully readers will be able to obtain a beta invitation if they aren't already "on-boarded" by July.

Mike Taulty Finds the Replacement for ADO.NET Data Services' DataWebKeyAttribute

Mike's ADO.NET Data Services and the Missing DataWebKeyAttribute post of May 19, 2008 explains that SP1 renamed it DataServicesKeyAttribute. This is consistent with the replacement of Web by Services in most class, method and property names.

If the Entity Framework back-end can't detect the table's primary key column you mus prefix the the class declaration with [DataServicesKey("ColumnName")] as mentioned in the ADO.Net Data Services Over LINQ to SQL? forum post.

Wally McClure Finds He Needs the Visual J# Redistributable to Get Meaningful Error Messages from ADO.NET Data Services

Strange, but apparently true, as Wally reports in ADO.NET Data Services in.NET 3.5 SP1 Beta1 of May 19, 2008. He promises a podcast about his Astoria experiences shortly.

Jon Skeet Gives Parallel LINQ a Workout with Nine Parallel LINQ (PLINQ) Mandelbrot Set Implementations

The Mandelbrot set is an ideal test bed for determining the efficiency of parallel processing algorithms and libraries. So Jon Skeet, C# MVP in the UK, decided to compare the performance of Parallel LINQ (PLINQ) with the Parallel Extensions (ParallelFx) with a variety of different approaches. The benchmarks are downloadable from his Mandelbrot revisited - benchmark edition post of May 18, 2008, which includes code samples and commentary.

Jon finds ParallelFx's ParallelForLoop implementation to have the best overall performance, but the PLINQ Unordered ParallelLinqInPlace approach wasn't far behind it.

Tuesday, May 20, 2008

Danny Simmons Answers the Frequently Asked Question: Why Use the Entity Framework?

Updated 5/19/2008 and 5/20/2008 (see end of post and comments)

Traditional ADO.NET provides high-performance access to a wide range of relational database management systems (RDBMSs) with a common set of managed DbConnection, DbCommand and other Db... objects, as well as typed and untyped DataSets. DataSets were designed from the git-go to be serialized for n-tier service-oriented (formerly XML Web services) architecture. They carry current and original values with them across tiers to manage concurrency conflicts. LINQ to DataSet extends LINQ's Standard Query Operators to DataSets.

LINQ to SQL is an easy-to-use object/relational management (O/RM) tool that's designed for simple application scenarios with SQL Server 2000+ on the back end. LINQ to SQL v1 isn't suited to service-oriented architecture because its object graphs (entities with associations) can't be serialized with the Windows Communication Framework (WCF) DataContractSerializer. (The LINQ to SQL team appears not to have updated its entity classes to take advantage of the upgraded version of VS 2008 SP1 Beta's DataContract Serializer.) Several third parties have written wrappers or add-ons to make SQL Server operable in n-tier projects.

nHibernate is a mature, well-supported, open-source O/RM that offers plain old CLR objects (POCOs), persistence ignorance, great modeling flexibility and many third-party add-ins. nHibernate is widely used in n-tier, service-oriented .NET projects. A LINQ to nHibernate project is in early stage development. nHibernate is owned by Red Hat Middleware LLC and licensed under the Lesser GNU Public License (LGPL.) Ayende Rahien (Oren Eini), the author of Rhino Mocks, is a principal contributor to nHibernate.

There are 40+ commercial and open-source third-party O/RM tools for .NET. LLBLGen Pro, Genome and EntitySpaces are three examples of commercial O/RM tools that implement LINQ.

So an obvious issue for data-oriented .NET developers is should I use an O/RM and, if so, which one should I choose as my "standard O/RM?" Few independent developers or development teams can afford the time to gain expertise with the ins and outs of multiple, highly complex O/RM tools, such as nHibernate.

Danny Simmons' Why use the Entity Framework? post of May 16, 2008 briefly compares the ADO.NET Entity Framework (EF) with traditional ADO.NET and DataSets, LINQ to SQL, and nHibernate. However, it's his comparison with nHibernate that contains the most important reason for .NET developers to choose EF:

The EF was specifically structured to separate the process of mapping queries/shaping results from building objects and tracking changes.  This makes it easier to create a conceptual model which is how you want to think about your data and then reuse that conceptual model for a number of other services besides just building objects.

Long-term we are working to build EDM awareness into a variety of other Microsoft products so that if you have an Entity Data Model, you should be able to automatically create REST-oriented web services over that model (ADO.Net Data Services aka Astoria), write reports against that model (Reporting Services), synchronize data between a server and an offline client store where the data is moved atomically as entities even if those entities draw from multiple database tables on the server, create workflows from entity-aware building blocks, etc. etc.

Not only does this increase the value of the data model by allowing it to be reused for many parts of your overall solution, but it also allows us to invest more heavily in common tools which will streamline the development process, make developer learning apply to more scenarios, etc.  So the differentiator is not that the EF supports more flexible mapping than nHibernate or something like that, it's that the EF is not just an ORM--it's the first step in a much larger vision of an entity-aware data platform. [Emphasis and formatting added.]

As Danny notes, EF is the preferred back-end for ADO.NET Data Services, which in turn will become the on-premises version of SQL Server Data Services (SSDS). EF also is the preferred back end for ASP.NET Dynamic Data. The Live Mesh team is working with the Astoria Folks to incorporate "Astoria Offline," which combines ADO.NET Data Services and the Microsoft Sync Framework, into their fledgling online/offline desktop. Synergy with current and future Microsoft applications, tools and platforms is the most important reason to choose EF.

Update 5/19/2008: Frans Bouma posts a "Why not to use the Entity Framework" treatise as Why use the Entity Framework? Yeah, why exactly?

Update 5/20/2008: More doubters:

Julie Lerman posted this link to Bloglines citations of Danny's post in her Responses to Danny Simmons "Why Entity Framework" post of May 20, 2008.

Saturday, May 17, 2008

LINQ and Entity Framework Posts for 5/16/2008+

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

Danny Simmons on Why use the Entity Framework?

My Danny Simmons Answers the Frequently Asked Question: Why Use the Entity Framework? of May 18, 2008 analyzes Danny's answer and agrees with his conclusions, as do Jon Papa, Julie Lerman, and Jonathan Carter (so far).

Added: 5/18/2008

Location of Missing ADO.NET Data Services AJAX Client Library

My "Manipulate Data in the Cloud with ADO.NET [Data Services]" story for Visual Studio Magazine's May 2008 issue mentions the ADO.NET Data Services AJAX Client Library but doesn't give its location, which is ADO Data Service AJAX Client Library on CodePlex.

For a guided tour of using the AJAX Client library, try Jonathan Carter's ADO.NET Data Services Part 6: AJAX post.

Added: 5/18/2008

Mike Taulty Duplicates My Problems with VS 2008 SP1 Beta Installation

Mike Taulty had the same problem I encountered with my first installation of the VS 2008 SP1 Beta bits: Indication of a successful install followed by no templates for ADO.NET Entity Data Model or ADO.NET Data Services. (See the "VS 2008 SP1 Beta Didn't Install on My Primary Development Machine (but Said It Did)" topic below.)

Mike's VS 2008 Service Pack 1 - Docs and Installation post of May 18, 2008 tells the gory tale.

ADO.NET Program Manager Sanjay Nagamangalam has some suggestions for three problem scenarios in this VS2008 SP1 Beta fails to add "new item - ADO.NET Entity Data Model" Item Template thread in the