Wednesday, April 15, 2009

LINQ and Entity Framework Posts for 4/6/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)

Matthieu Mezil reports multiple EDM Designer: one more new feature[s]:

  • On 4/12/2009: [W]hen an entity type isn't mapped or is only partially mapped (so we aren't able to use our edmx), I reduce its opacity.
  • On 4/11/2009: [T]he ability to see with context menu in which views the selected type (entity type or complex type) is present and the ability to navigate to this view.
  • On 4/7/2009: Published EDM Designer: new version

Gil Fink reminds EF developers on 4/10/2009 that the ADO.NET Entity Framework Extensions Library includes:

[U]tilities that make querying stored procedures,
creating typed results from DB data readers and state tracking external data much easier in the Entity Framework. A sample application demonstrates several patterns using these
utilities, including stored procedures with multiple result sets, materialization of CLR types, and registering entities in the Entity Framework state manager” (the description is taken from the library’s page). The following utilities are included in the current release of the
ADO.NET Entity Framework Extensions library:

  • Execution of store commands via the ObjectContext.
  • Connection lifetime management.
  • State management of entities from external sources.
  • Materialization of arbitrary CLR types given a data reader or DB command.
  • Stored procedure mapping:
    • Multiple result sets.
    • Column renames, polymorphic results and nested structures via the
      materialization service.
  • Getting and setting key values for entity references.
  • Rewrite InvocationExpressions in LINQ queries and expressions.

You can download the library from here.

Danny Simmons attacks Building N-Tier applications with the EF – The Basics on 4/8/2009 with more about new features in EF v4 as well as suggestions for n-tier apps in EF v3.5.

Danny SimmonsD3: Using T4 to Generate Entity and Context Classes post of 4/8/2009 explains how to use T4 templates “to create the DPMud model using the EF Designer and then generate both the classes and the database from the model (database generation has been discussed previously on the EF Design blog).”

Goodbye Linq to SQL POCO, Hello nHibernate

Simon Segal reports on 4/7/2009 that his Entity Framework Profiler hosts IronRuby and IronPython.


Jason Young’s Unit Testing a LINQ to SQL or EF Query post of 4/9/2009 begins:

I was writing a slightly non-trivial method to query a database to find a record matching a certain time range. It quickly became clear that it would be nice to write some automated unit tests against it. Integration tests would be less than ideal because of the execution time and complexity. I ended up with a way to test the code without jumping through too many hoops.

Steve from TeamDataLogic’s Goodbye Linq to SQL POCO, Hello nHibernate post of 4/8/2009 announces:

After a long time trying to get model first poco working with Linq to SQL (using xml mapping files) we have finally given up and have moved over to nHibernate.

Matt Warren surfaces on 4/8/2009 with Building a LINQ IQueryable provider - Part XIV (IQToolkit v3), “the fourteenth in a series of posts on how to build a LINQ IQueryable provider.” Matt suggests:

If you have not read the previous posts you might request a week’s vacation, sit back, relax with a mochacino in one hand a netbook in the other, or if you've got better things to do with your time print them all out and stuff them under your pillow.

.NET Junkie’s Integrating Enterprise Library Validation Application Block With LINQ to SQL and Entity Framework Part 1: Basic Integration post of 4/7/2009 “describes how to integrate the Enterprise Library Validation Application Block in conjunction with an O/RM technology such as LINQ to SQL and Entity Framework.”

David DeWinter’s LINQ to SQL: Updating Entities post of 4/7/2009 begins:

Updating entities using any object-relational mapper can be difficult for at least two reasons: (1) the number of update options that these ORM frameworks provide and (2) the complexity of requirements in today’s business scenarios. With this post I want to discuss a few of the ways that you can update entities in LINQ to SQL to fit your particular scenario.

LINQ to Objects, LINQ to XML, et al.

Suprotim Agarwal explains how to Return the First Element of a Sequence in LINQ in this brief 4/10/2009 article.

LinqMaster shows you How to Use LINQ GroupBy in this 4/8/2009 post.

ADO.NET Data Services (Astoria)

My Uploading Entities for Storage in Azure Tables of 4/9/2009 discusses “the ease, speed, accuracy and reliability of uploading typical entities to persistent storage, as well as the cost of data ingress/egress and long-term storage.”

ASP.NET Dynamic Data (DD)

Steve Naughton’s Hiding Foreign Key column Globally in Dynamic Data post of 4/11/2009 “is based on a question in the Dynamic Data forum Hide Foreign Key Column:”

And so I thought I’d document what I did for posterity or at least so I can find it again if ever the question arises again. So I decided  here is what I would need:

  1. An Attribute to mark FK relation ships as hidden.
  2. Some Extension methods to extract and test the attribute
  3. An IAutoFieldGenerator to filter the Columns on a page

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+.

SQL Server Compact (SSCE) 3.5 and Sync Services

Shawn Kelley announced on 4/7/2009 a Custom Conflict Resolution Survey for the SyncFramework and requests answers to three questions as comments to the post.

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

Guy Burstein brings developers up to date on .NET RIA Services with:

Charlie Calvert’s Creating a New Silverlight Project in Visual Studio 2008 post shows you how to “start a new Silverlight project or how to add a new or existing Silverlight project to an existing ASP.NET Web Application.”