Sunday, March 08, 2009

LINQ and Entity Framework Posts for 3/1/2009+

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

• Updated 3/8/2009 10:00 AM: Additions

Entity Framework and Entity Data Model (EF/EDM)

Guy Burstein’s Building an Occasionally Connected ADO.Net Data Service with “Astoria Offline” Preview post of 3/7/2009 is a detailed, illustrated tutorial that shows you how to use the new Astoria Offline preview with Entity Framework.

Rob Bagby’s Entity Framework Modeling: Table Per Type Inheritance post of 3/6/2009 sings the praises of Table Per Type (TPT) inheritance modeling in the Entity Framework. His sample application is based on StudentTPT, AdminTPT, and InstructorTPT tables that inherit from a base PersonTPT table, as well as a BusinessStudentTPT that inherits from StudentTPT.

Rob also has stated an Entity Framework Index post to catalog forthcoming brief series of blog posts and screencasts on the ADO.NET Entity Framework.

Jonathan van de Veen’s Adventures while building a Silverlight Enterprise application part #8 post of 3/4/2009 uses EF in an unconventional way as the back end for a Silverlight project. In the reply to a comment, Jonathan says he didn’t use ADO.NET Data Services with EF due to “some security issues.”

Alex James acknowledges receipt of a review copy of my LINQ and EF book, as well as Julie Lerman’s EF title, in his Tip 2 - Entity Framework Books post of 2/26/2009.

Gil Fink demonstrates Entity Splitting in Entity Framework in this 3/6/2009 post. Gil writes:

Entity splitting is a scenario that happen when our entity is constructed
from many tables in the database. This happens for example when we don’t
want duplications in our database and use lookup tables instead which our
table has a reference key to those tables. More scenarios can be that we
decide to split our entity representation in the database.

When we have such scenarios the wizard of Entity Framework don’t know
that we split our entity and we have to map the entity to more then
one table.

Simon Segal continues his Lazy Loading Saga with Lazy Loading and the Entity Framework. How long I can go on like this? of 3/5/2009. Simon includes downloadable source code and promises:

I will soon follow with an Item Template for VS.Net that creates the attribute file and makes the references for you automatically.

LINQ to SQL

David Haden gives the thumbs up to Sculpture - Model-Driven Development Code Generation Framework in his 3/8/2009 post. Sculpture has built-in support for

  • DAAB (Data Access Application Block)
  • NHibernate
  • LINQ to SQL
  • CSLA framework

data sources.

Omar Al Zabir’s Linq to SQL solves Transaction deadlock and Query timeout problem using uncommitted reads post of 3/7/2009 explains how to use WITH (NOLOCK) or READ UNCOMMITTED with LINQ to SQL queries that incur deadlocks or timeouts due to multiuser contention issues.

Javed Hasan suggests using the TransactionScopeOptions.TransactionOptions collection in a comment, but Omar contends that System.Transactions has too much overhead for a high-volume website.

• Chad Moran’s Beware of DataLoadOptions.LoadWith<> post of 3/7/3009 describes an issue with the SQL TOP(n) statement generated for the DataContext.LoadWith<T> method. The original code took 17 second to run against 250,000 rows with appropriated indexes. Changing the query to apply TOP(10) before the JOIN and ORDER BY clauses reduced the time to 17 ms.

Alec Tang’s Some basic LinQ to SQL syntax post of 3/5/2009 describes how he uses LINQ to SQL syntax with the Telerik Open Access object/relational modeling (O/RM) tool.

Jacob Proffitt complains about BlogEngine.net’s Gratuitous Use of Linq in this 3/4/2009 post. Jacob plans to:

    • Decide on a database update methodology (so far, I’m using the already-existing tables and hence piggy-backing on the BlogEngine.Net scripts)
    • Replace the built-in ReferrerModule (use/create provider model access for referrers?)
    • Comb the project for any other errant XML dependencies
    • Work on multi-blogging configuration

Ben Hoelting and Eric Johnson present a LINQ : The DBA vs the Developer video (3/4/2009) for David Yack to play during his Rocky Mountain Tech-Trifecta keynote.

LINQ to Objects, LINQ to XML, et al.

Rick Strahl’s Dynamic Delegates with Expression Trees post of 3/8/2009 expands on Nate Kohari’s Fast Late-Bound Invocation with Expression Trees post of 3/6/2009 to describe dynamic invocation with LINQ Expressions:

One of the really cool features of LINQ is the ability to create Expression Trees. Expression trees are in effect fancy code generators that allow you – among other things – to generate dynamic code on the fly. The idea is that you can basically construct the content of a delegate dynamically and then return the lamda expression (a delegate) back as a result. This sort of thing was possible prior to .NET 3.5 and LINQ, but it was a lot more cryptic as you had to use Reflection.Emit to generate and compile the code. Additionally high trust environments where required.

Sadek Drobi interviewed Erik Meijer during the QCon San Francisco conference and posts the video and the text of a Q and A session in his Erik Meijer on LINQ article of 6/4/2009. Sadek writes:

Erik Meijer talks about less known LINQ features, like the ability to do meta programming or the fact that LINQ works against any data collection that implements the sequence operators. Meijer also talks about the differences between functional languages and objectual ones, asynchronous computation, and the evolution of languages.

ADO.NET Data Services (Astoria)

Pablo Castro announces the arrival of an “Astoria Offline” preview in his Busy week: ADO.NET Data Services v1.5 CTP coming and "Astoria Offline" preview out post of 3/7/2009. For details of downloading the preview, see the Astoria Team’s Announcing Project Codename “Astoria Offline”, Alpha Preview post of the same date.

Guy Burstein’s Building an Occasionally Connected ADO.Net Data Service with “Astoria Offline” Preview post of 3/7/2009 is a detailed, illustrated tutorial that shows you how to use the new Astoria Offline preview with Entity Framework. (Copied from the “Entity Framework and Entity Data Model (EF/EDM)” section.)

Andrew Conrad’s “VT20, Building Data Service Applications Part 2: Applications for the Real World” session at VS Live! San Francisco provided more details about Astoria v1.5 and Windows Azure/SDS. Andy provides a link to his slide decks and source code for two Astoria sessions in his VSlive Presentations and demos post of 3/4/2009. Here’s a shortcut.

ASP.NET Dynamic Data (DD)

D. A. Panther’s Evolutility - A Dynamic Scaffolding Framework post of 3/6/2009 describes Evolutility as appearing “to be a dynamic scaffolding framework to build ASP.NET applications with.”

SQL Data Services (SDS) and Cloud Computing

This topic moved on 1/3/2009 to Windows Azure and Cloud Computing Posts for 1/5/2009+.

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

Jeffrey Schwartz reports RC2 of ASP.NET MVC Released in this 3/5/2009 Redmond Developer News article.

Aaron Skonnard’s Screencast: Ajax-enabling your WCF services of 3/6/2009 “guides the viewer through the process of Ajax-enabling your WCF services, allowing you to easily consume them from within your Ajax client pages.”

And his Screencast: Calling RESTful Services with WCF of the same date “introduces the client-side experience for using WCF to consume RESTful services. You'll see how to use the new WebChannelFactory class to create channels that know how to map method calls into traditional HTTP verbs (GET, POST, PUT, and DELETE).”

2 comments:

Trant said...

Jacob isn't complaining about LINQ in BlogEngine.NET - it doesn't yet use it - but rather showing how it could be used.

Anonymous said...

As Trant said. I'm the gratuitous LINQ user...