Sunday, October 12, 2008

LINQ and Entity Framework Posts for 10/6/2008+

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

Updated 10/10/2008 to 10/12/2008: Added a few items
Updated 10/9/2008 9:00 AM PDT: Added items
Updated 10/8/2008 3:00 PM PDT: Added items
• Updated 10/7/2008 5:00 PM PDT: SSCE, LINQ to XML, ASP.NET Dynamic Data, CLINQ, MVC Scaffolding

Entity Framework and Entity Data Model (EF/EDM)

Alex James has posted EDM and Store functions exposed in LINQ by Colin Meek and Diego Vega to the Entity Framework Design blog. This post describes “an extensibility mechanism that people can use to map arbitrary CLR methods to appropriate server and EDM functions” for EF v2. The authors say:

It is actually possible for us to improve our LINQ implementation so that all functions defined in the EDM and in the store, and even user defined functions, can be mapped to CLR methods with homologous signatures.

Matthieu Mezil continues his proof of concept (POC) for improving the behavior of ADO.NET Data Services with EF as the data source in his ADO.NET Data Services Hooking POC v2 post of 10/8/2008. His POC tries to resolve the following issues:

ADO.NET Team posted Migrating from LINQ to SQL to Entity Framework: Eager Loading, the first of a series about migrating from LINQ to SQL to the Entity Framework, on 10/7/2008. The team says:

This first post in the series covers Eager Loading in LINQ to SQL, and the steps for migrating to equivalent constructs in the Entity Framework in .NET 3.5 SP1. Subsequent posts will cover Deferred Loading, LINQ specifics, concurrency, mapping, stored procedure support, and other topics. As we continue to approach the next release of the Entity Framework we will revisit how some of the new features aid in migration.

Tommy Williams claims to have a new version of one or more Entity Framework Toolkits & Extensions in his UPDATED WIKI: Home post of 10/6/2008. However, I can’t find a single item that was updated after 8/12/2008. Have I gone blind?

Eric Nelson copies the tables from Elisa Flatko’s Introducing LINQ to Relational Data of January 2008 to his Q&A: Deciding between LINQ to SQL and LINQ to Entities post of 10/6/2008.

Euan Garden’s High performance loading in SSIS for Oracle and Teradata post of 10/5/2008 points to the download for SSIS Connectors for Oracle and Teradata. You’ll need the Teraddata connector to load tables into SQL Server if you’re use EF or LINQ to SQL, because there’s no EF-enabled ADO.NET managed client for TeraData (yet).

Kristofer Andersson’s Huagati DBML/EDMX Tools extend the automated Update LINQ to SQL Documentation from Database feature to Update ADO.NET Entity Data Model Documentation from Database.

This new menu choice corrects the problem Kris notes in his Tools - Part 5 - Add-ins - Documentation features in Entity Framework vs Linq-to-SQL post of 9/5/2008:

The appearance of “There are no comments for [name] in the schema” as the value of the Documentation property of each EntityType and its members.

The option automatically imports description data and adds index information from table metadata in the same manner as for LINQ to SQL data sources. (Repeated from Sunday 10/5/2008).

LINQ to SQL

•••• Rick Strahl explains how to handle LINQ to SQL errors like the following in his LINQ to SQL DBML fails to build or open post of 10/10/2008:

Error 1 Build failed due to validation errors in d:\path\filename.dbml. Open the file and resolve the issues in the Error List, then try rebuilding the project.

Rick says “The fix is to run devenv /ResetSkipPkgs.”

Daniel Crenna has completed with LINQ + WCF + Silverlight (Part Seven) his detailed seven-part series that architects a complete Silverlight 2 solution and uses LINQ to SQL as its data source. Click here for links to all seven parts.

Corey Roth’s Updating Data with LINQ to SQL and GridViews when using a View post of 10/7/2008 describes how to deal with the The Entity is not of the correct type update errors when using an SQL Server view as the data source for a LinqDataSource and bound GridView controls.

Rob Conery uses LINQ to SQL as the data source for his new SubSonic MVC Scaffold Addin released as a preview on 10/7/2008. See the Miscellaneous section for details.

LinqMaster describes the LINQ to SQL syntax to assure that the T-SQL Where criterion generated for null-valued fields uses IS NULL instead of = NULL in his How to Use "Is Null" With LINQ to SQL post of 10/6/2008.

Euan Garden’s High performance loading in SSIS for Oracle and Teradata post of 10/5/2008 points to the download for SSIS Connectors for Oracle and Teradata. You’ll need these to load Oracle or TeraData tables into SQL Server if you’re using LINQ to SQL.

See Eric Nelson’s Q&A: Deciding between LINQ to SQL and LINQ to Entities post of 10/6/2008 in the “EF/EDM” category.

LINQ to Objects, LINQ to XML, et al.

Erick White describes in his Using LINQ to XML Events and Annotations to Track if an XML Tree has Changed post of 10/12/2008 a technique to track whether a document’s XML tree has changed by doing the following:

  • Add a couple of event handlers to the XDocument. One (or both) of these event handlers will be called if any changes whatsoever are made to the tree.

  • When the event handler method is called, remove the event handlers, and add an annotation to the XDocument of type ChangedSemaphore.

  • Then, at any point in time, examine the XDocument – if it has a ChangedSemaphore annotation, the XDocument has changed. If it has no ChangedSemaphore annotation, the XDocument is unmodified.

Agnes Molnar (Aghy) announces Linq4SP - RC1 is available to download! on 10/8/2008.

• Kevin Hoffman explains in his Smart, Deep Property Notifications in CLINQ v2.0 of 10/7/2008 a new feature in forthcoming Continuous LINQ (CLINQ) v2.0 that sends property change notifications only if they affect the current CLINQ query result set. This feature cures a serious performance issue with CLINQ v1.

• Beth Massi offers links to download her LINQ to Everything and Taking Advantage of LINQ and Open XML in Office 2007 presentations to the SDN Conference in the Netherlands and their source code in her First Day at SDN Conference post of 10/7/2008.

LINQ to Everything covers only the four VS 2008 SP1 implementations: LINQ to SQL, LINQ to Entitites, LINQ to DataSet and LINQ to XML. It takes a fast shuffle to cover that much territory in a one-hour (or so) session. Shawn Wildermuth presented a Cloud Computing session at the conference.

Doug Rothaus of the VB Team shows you how to replace an XSLT transform with a VB XML literal in his VB XML Cookbook, Recipe 6: Writing an XSLT Transform in VB (Doug Rothaus) of 10/6/2008.

Eric White’s Formatting LINQ Code post of 10/6/2008 describes his preferences for formatting LINQ to SQL Queries.

Miguel de Icaza announces that Mono 2.0 has (finally) released in his Mono 2.0 Release Notes post of 10/6/2008. Mono 2.0 contains the following Microsoft-compatible API's that run on Linux, MacOX, and other Unix systems:

  • ADO.NET 2.0 API for accessing databases.
  • ASP.NET 2.0 API for developing Web-based applications.
  • Windows.Forms 2.0 API to create desktop applications.
  • System.XML 2.0: An API to manipulate XML documents.
  • System.Core: Provides support for the Language Integrated Query (LINQ).
  • System.Xml.Linq: Provides a LINQ provider for XML.
  • System.Drawing 2.0 API: A portable graphics rendering API.

Other features include:

  • C# 3.0 compiler implementation with full support for LINQ and expression trees.
  • Visual Basic 8 compiler.
  • An implementation of .Net's System.Windows.Forms namespace
  • WebBrowser based on Mozilla's Gecko HTML rendering engine.

Congratulations to all involved.

Miguel de Icaza’s DbLINQ, LINQ to Databases and Mono post of 10/2/2008 links to Atushi Enomoto’s Mono's Linq to SQL effort based on DBLinq post of the same date, which describes a LINQ to SQL clone that supports multiple RDBMSs. (Repeated from 10/2/2008).

ADO.NET Data Services (Astoria)

Shawn Wildermuth posted on 10/10/2008 links to the source code for three of his four presentations at the SDN Conference near Amsterdam in SDN Conference - Demo Code. His NE22: Inside ADO.NET Data Services session demonstrated a Silverlight front end for an Astoria data source.

Valeri Heristov demonstrates best practices for using the Telerik RadTreeView with load on demand and ADO.NET Data Service as its data source in his Silverlight TreeView Load on Demand post of 10/8/2008. The source code, which uses the Northwind sample database, is available for download.

Matthieu Mezil continues his proof of concept (POC) for improving the behavior of ADO.NET Data Services with EF as the data source in his ADO.NET Data Services Hooking POC v2 post of 10/8/2008. The full details are in the EF/EDM section.

• Adlai Maschiach’s IE – View RSS as plain XML [ADO.NET Data Services] post of 10/6/2008 shows you how to prevent IE 7 or 8 from displaying Astoria’s AtomPub output as an Atom feed. (But you already know how to do this now if you’ve used Astoria.)

Phani Raju shows you how to avoid an Astoria & IIS , HTTP 400 Bad Request on Posting Large Payloads to an Astoria Service by setting the MaxReceivedMessageSize property on the WCF binding in his 10/6/2008 post.

Aurelian Popa’s WF 4.0, WCF 4.0 and "Dublin" (Windows vNext) post of 10/6/2008 describes Dublin’s WCF REST features as follows:

The WCF REST Starter Kit is an early preview of capabilities that will be shipped with WCF in the .NET Framework 4.0. The Starter Kit provides Visual Studio project and item templates for common RESTful scenarios: REST Singleton Service, REST Collection Service, ATOM Feed Service, Atom Publishing Protocol Service and HTTP Plain XML Service. WCF already includes REST support today; the starter kit will make it even easier to get REST services up and running using WCF.

Undoubtedly Astoria v2 will take advantage of these features and might finally support POX over HTTP. I’ve been lobbying for POX over HTTP since Pablo Castro removed it from Astoria v1.

ASP.NET Dynamic Data (DD)

Steve Naughton adds custom metadata providers to the Table/Class objects in his Dynamic Data – Custom Metadata Providers post of 10/12/2008. These objects are an addition to the Column/Properties objects that Matt Berseth described in his Dynamic Data And Custom Metadata Providers of 8/24/2008.

Steve Naughton continues his Dynamic Custom PageTemplates series with Dynamic Data Custom Pages: Dynamic/Templated FromView, which exchanges the FormView for ListView control. Steve says:

Continuing on from Part 3 the same techniques will be applied to the FormView, making the FormView Dynamic and also having the facility to dynamically load user defined Templates at runtime.

Scott Hanselman’s Plug-In Hybrids: ASP.NET WebForms and ASP.MVC and ASP.NET Dynamic Data Side By Side detailed post of 10/1/2008 is intended to reduce “confusion about how ASP.NET WebForms, MVC and Dynamic Data all fit together.”

Rob Conery uses LINQ to SQL as the data source for his new SubSonic MVC Scaffold Addin released as a preview on 10/7/2008. See the Miscellaneous section for details. Rob’s project sounds to me like it will give DD a run for the money. Even if not, it’s destined to interest ASP.NET developers thinking of moving to Ruby on Rails.

DAPanther gets the ball rolling with the first episode of his promised series: ASP.NET Dynamic Data, The Beginning… (Part 1 of 2) of 10/6/2008. This part starts a Visual Basic DD app based on the AdventureWorksLT database.

Steve Naughton emulates a GridView with Insert capability in his Dynamic Data Custom Pages: Dynamic/Templated Grid with Insert (Using ListView) post of 10/5/2008.

SQL Server Data Services (SSDS) and Cloud Databases

•••• The JETLaw Blog’s What’s Hiding in the Clouds?: Privacy Issues with Cloud Computing post of 10/12/2008 expresses the concern that courts have held the privacy of information stored on the Internet to be less sacrosanct as that stored on an individual’s computer.

•••• Roger Jennings wonders when Microsoft’s Cloud Services team will start reading from the same product-naming playbook in his Windows Strata: Here Yesterday, Gone Today post of 10/10/2008.

Frank Gens produced IDC’s IT Cloud Services Forecast - 2008, 2012: A Key Driver of New Growth detailed research post of 10/8/2008. Frank says:

In this post, We offer our initial forecast of IT cloud services delivery across five major IT product segments.we offer our initial forecast of IT cloud services delivery across five major IT product segments that, in aggregate, represent almost two-thirds of enterprise IT spending (excluding PCs).  This forecast sizes IT suppliers’ opportunity to deliver their own IT offerings to customers via the cloud services model (”opportunity #1“, as described in our recent post Framing the Cloud Opportunity for IT Suppliers).

IDC expects Cloud Services spending to grow at a compounded rate (CAGR) of 27% during 2008 to 2012 versus all IT spending’s 7% CAGR. The post has numerous links to earlier IDC research items on Cloud Computing.

Long Zheng asks “Windows Strata” - name of the Microsoft cloud OS? in his post of 10/2/2008. Long says:

“Windows Strata” could be either another codename or even dare I say the final name for the “Windows Cloud” operating system Ballmer has been touting much lately as the name has recently condensed on the Microsoft Professional Developers Conference website.

Amazon Web Services has published a Overview of Security Processes whitepaper “that should help answer some initial questions about physical and operational security processes for network infrastructure controlled by AWS.” Following are two interesting points that relate to SimpleDB:

  • AWS is working with a public accounting firm to ensure continued Sarbanes Oxley
    (SOX) compliance and attain certifications such as recurring Statement on Auditing
    Standards No. 70: Service Organizations, Type II (SAS70 Type II) certification.
  • AWS customers have built HIPAA-compliant healthcare applications using S3
    and other components.

SimpleDB competitors, such as Google App Engine and SSDS, undoubtedly will be required to offer SOX and HIPAA-compliant security features.

Aral Balkan explains Why Google App Engine is broken and what Google must do to fix it in his post of 10/3/2008. The problems he cites are:

  • 1MB limit on data structures must be removed.
  • Quotas must be handled optimistically, without crippling applications at the very moment that they should be benefitting from The Cloud.
  • The "intelligent throttling" "feature" and short-term CPU quotas must be removed.
  • The 1,000 item limit for offsets in queries must be removed.
  • Support for long-running processes must be added.

Aral concludes that GAE is “25% ready for prime-time.”

SQL Server Compact (SSCE) 3.5 and Sync Services

Manikyam Bavandla’s How to: Authoring a 64-bit ClickOnce Bootstrapper package in Visual Studio 2008 SP1 of 10/6/2008 provides the details for creating a bootstrapper package for SQL Server Compact (SSCE) 3.5.

Visual Studio 2008 Service Pack 1 (General)

No posts as of 10/6/2008 9:00 AM PDT 

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

Rob Conery’s MVC Storefront Part 22: Restructuring, Rerouting, and PayPal post of 10/11/2008 includes a long screencast (~50:00) about cleaning up his routing scheme, implementing PayPal Standard, and improving appearance with CSS tweaks. Source code is available as usual.

Daniel Crenna has completed with LINQ + WCF + Silverlight (Part Seven) his detailed seven-part series that architects a complete Silverlight 2 solution and uses LINQ to SQL as its data source . Click here for links to all seven parts. (Copied from the LINQ to SQL section)

Scott Hanselman interviews Rob Conery about SubSonic and his new SubSonic MVC Scaffold Addin (see below) in Hanselminutes Show #132 of 10/2/2008.

•• John Papa has code updated to RC0 available for his Service Driven Apps with WCF and Silverlight 2 MSDN Magazine article from a link in Updated Sep 2008 MSDN Article Code for Silverlight 2 RC0 of 10/8/2008.

•• Scott Hanselman’s detailed Plug-In Hybrids: ASP.NET WebForms and ASP.MVC and ASP.NET Dynamic Data Side By Side post of 10/1/2008 is intended to reduce “confusion about how ASP.NET WebForms, MVC and Dynamic Data all fit together” (repeated from the DD section).

Rob Connery releases a 10/7/2008 preview of his SubSonic MVC Scaffold Addin, which will generate scaffolded Views and a Controller using [LINQ to SQL] similar to ASP.NET Dynamic Data. The pre-release requires MVC Preview 5. A 6:18 video with what sounds like a Roland 808 drum track on meth shows you how to get started with (what else) Northwind.

Rob says:

I didn't use SubSonic because IQueryable isn't ready to go. In addition, a LOT of people use [LINQ to SQL] and the goal here is to help as many people as I can. But I WILL be plugging in an option to use SubSonic. [Emphasis Added.]

I believe Robs new Scaffold add-in, available as an MSI or ZIP file, will give MVC a major boost.

Roger Jennings points out in his Google Analytics Data for the OakLeaf Blog, 9/4 to 10/4/2008 post of 10/5/2008 that the Oakleaf Systems blog is in the top 12% of all blogs tracked by Technorati for monthly page views and visitors and in the top 1.8% by Technorati Authority. (Repeated from 10/5/2008).

0 comments: