Sunday, August 23, 2009

LINQ and Entity Framework Posts for 8/17/2009+

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

Entity Framework and Entity Data Model (EF/EDM)

Julie Lerman’s Languages in the 2nd Edition of Programming Entity Framework post of 8/20/2009 explains that to keep her second edition to 800 pages that she’ll need to excise the VB code samples from the text. I did the same in my forthcoming Cloud Computing with the Windows Azure Platform title for Wrox, although in this case the print version is 300+ pages.

Don’t miss the Giant Puppy Pics of Sampson that Julie added on Sunday.

Jonathan Bruce reports Released! ADO.NET Entity Framework Support for Oracle on 8/13/2009:

I am happy to announce that we’ve released our GA for Connect for ADO.NET 3.3! This includes our support for the ADO.NET Entity Framework for Oracle and a host of enterprise-ready features that will greatly enhance your makes EF deployment on your Oracle systems.

Let us know what you think (comment below) and go grab a copy of our trial so you can get started today!

Julie Lerman’s More on Oslo & Data Programmability merger post of 8/20/2009 reports:

Well, the merger was actually much bigger than just Oslo and DP. The entire Connected Systems team and Storage Platforms team (think of that as SQL, with Data Programmability inside of SQL, not DevDiv as one might think) came together.

And it was not a matter of one team being absorbed by another.

A whole new group was created: The Business Platform Division.

Beth Massi explains Using the ReportViewer with ADO.NET Data Services and Entity Framework in her 8/19/2009 post:

If you’ve ever tried to use the ReportViewer to design a client-side report with an ADO.NET Data Service data source (or use an Entity Data Model directly) you may be disappointed. If you try to design a new report, the wizard may crash Visual Studio when selecting an entity. Yikes!

Fortunately, she provides the workaround.

Muhammad Mosa’s Multiple database support with Entity Framework post of 8/18/2009 begins:

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the under[l]ying database provider. In this post I’m going to show how to build an application that support[s] multiple databases using same conceptual model made by Entity Framework.

Alex James continues his EF tips with Tip 33 – How cascade delete really works in EF post of 8/18/2009 which contains these three “golden rules:”

  1. If you add an Cascade delete rule to the model, you MUST have a corresponding DELETE rule in the database.
  2. If you absolutely insist on breaking rule (1) for some reason, Cascade will only work if you have all the dependents loaded in memory.
  3. (2) is *not* recommended!!!


Jim Wooley’s Generating Interfaces for LINQ to SQL Entities post of 8/17/2009 shows you how to customize Damien Guard’s L2ST4 code generation template to toggle creating of interfaces for LINQ to SQL columns.

LINQ to Objects, LINQ to XML, et al.

Nikhil Kothari borrows an earlier LINQ provider name in his BLinq - Linq to Bing Search APIs post of 8/22/2009 (Thanks to Scott Guthrie for the heads-up.):

This post introduces a small sample I'm calling BLinq, which allows you to use LINQ to search for pages and images using the Bing search API... as a first step leading up to some .NET RIA Services integration.

As part of validating and playing with some of the extensibility features in .NET RIA Services, I needed to write a LINQ provider. This was also a good opportunity to delve into some of the deeper technical aspects of the IQueryable construct, expression trees and related concepts, which I had not gotten into first-hand until now. For my prototyping, I decided to write a LINQ provider for querying Bing to search for pages and images. This post will focus on using the LINQ provider itself, and seeing it in action, and in my next post I'll tie it all back to .NET RIA Services. I am calling this BLinq. :-)

… BingContext is very much like a Linq-to-SQL DataContext. It has a Pages property of type IQueryable<PageSearchResult> (ala a Table<T> in a DataContext). Of course this is LINQ, and so you can use standard LINQ constructs like Skip and Take for example to page over the search results. …

Polita Paulus introduced Blinq at Lang.NET 2006: 2006 Lang .NET Symposium to Expose Blinq for ASP.NET (6/19/2006). BLinq later inspired the development of ASP.NET Dynamic Data. Click here for all of this blog’s earlier Blinq posts. To prevent conflicts with earlier use of Blinq, this blog will refer to Nikhil’s app as LINQ to Bing.

Dan Vanderboom’s Strongly-Typed, Dynamic Linq Order Operator post of 8/20/2009 notes:

This morning I ran into a question about my dynamic Linq sort, solved and answered by “Ch00k”, allowing one to get compile-time checking of identifier names.  Well done!

LinqMaster explains How to Use LINQ OfType<> in this brief post of 8/23/2009:

LINQ OfType<> is a useful filtering function for returning items in a collection which match a specific type (or base type). An example might be for getting base items from a listbox of combobox.

An example without OfType:

ColorWrapper x = combo.Items.Where( obj => obj is ColorWrapper ).Cast< ColorWrapper >().FirstOrDefault(cw => cw.Color == value);

An example of LINQ OfType:

ColorWrapper y = combo.Items.OfType<ColorWrapper>().FirstOrDefault(cw => cw.Color == value);

Deborah Kurata describes Adding Nodes to an XML String with LINQ to XML in this 8/20/2009 post. She also offers Anonymous Types: An Introduction and Processing Files Using Anonymous Types posts of 8/19/2009.

Eric White’s DescendantsAndSelfTrimmed LINQ to XML Axis Method post of 8/19/2009 begins:

There are some circumstances where I need a variation on the DescendantsAndSelf axis method that allows me to specify that specific elements (and the descendants of those elements) are ‘trimmed’ from the returned collection.  One of the things that's great about LINQ to XML is the ease with which we can create specialized axis methods when necessary.

Here is the scenario: Open XML contains paragraphs that contain runs. A run can contain a picture that contains a text box, which itself contains a paragraph. When I want to write a transform for paragraphs that are children elements of the w:body element, I want to disregard any paragraphs that are children of contained text boxes.

ADO.NET Data Services (Astoria)

Claudio Caldato’s A new bridge for PHP developers to .NET through REST: PHP Toolkit for ADO.NET Data Services post of 8/21/2009 to the Interoperability@Microsoft blog begins:

Today, I’m excited to announce that we are releasing a new project that bridges PHP and.NET.

More precisely, we are releasing today the PHP Toolkit for ADO.NET Data Services which makes it easier for PHP developers to take advantage of ADO.NET Data Services, a set of features recently added to the .NET Framework. ADO.NET Data Services offer a simple way to expose any sort of data in a RESTful way. The PHP Toolkit for ADO.NET Data Services is an open source project funded by Microsoft and developed by Persistent Systems Ltd. and is available today on Codeplex:

Julie Lerman says “Yesterday I blogged that my client is writing a PHP app that hits an Astoria service that I built for them” in her Great timing! PHP toolkit for Astoria, err, ADO.NET Data Service post of 8/21/2009. She discovers how to use the “\” escape character in What I learned about PHP today of 8/20/2009.

ASP.NET Dynamic Data (DD)

No significant new articles for this topic as of 8/23/2009 11:30 AM PDT.

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

No significant new articles for this topic as of 8/23/2009 11:30 AM PDT.

blog comments powered by Disqus