Showing posts with label LINQ to SharePoint. Show all posts
Showing posts with label LINQ to SharePoint. Show all posts

Sunday, October 18, 2009

LINQ and Entity Framework Posts for 10/12/2009+

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

Entity Framework and Entity Data Model (EF/EDM)

Alex James continues his Entity Framework Tips series with Tip 38 – How to use CodeOnly with Astoria of 10/14/2009:

The normal way that you create an ADO.NET Data Services (aka Astoria) Service is by creating a class that derives from DataService<T>.

public class BloggingService : DataService<BloggingEntities>

And if you want to use Entity Framework under the hood the T you supply must derive from ObjectContext.

Under the hood the DataService constructs an instance of the BloggingEntities, and gets the model from it, via its MetadataWorkspace.

The problem is if you’ve configured the model using Code-Only, the only way to construct the BloggingEntities is via the Code-Only ContextBuilder, which Astoria knows nothing about.

Hmm….

Thankfully there is a very simple workaround, you simply override CreateDataSource() on DataService<T>.

Alex then shows you how.

Sam Gentile describes in his Focusing on Data – Try #3 post of 10/13/2009 how he came to the conclusion that he needed to understand SQL:

As I begun to spin up with a lot of Microsoft’s new generation of technologies like LINQ, LINQ to SQL, Astoria, and the Entity Framework, it became apparent that this couldn’t stand anymore. I had coded .NET the last few years without really embracing LINQ and similar technologies. As I begun to dig into LINQ (especially LINQ to SQL) and then tried to digest Julie Lerman’s fabulous and definitive Programming Entity Framework, I started to really feel that I had to understand SQL. When Julie’s book sailed over my head, I realized there were two issues here: LINQ itself and SQL. I wasn’t even digesting LINQ queries. This led me to two things. The first is Pluralsight’s On Demand course for LINQ taught by K. Scott Allan, and then  Murach’s ADO.NET 3.5: LINQ and the Entity Framework with C# 2008. That helped quite a bit with LINQ, LINQ to SQL and Entity Framework

Alex JamesCode-Only best practices post of 10/13/2009 begins:

There have been lots of posts on the EFDesign blog talking about how the features in Code Only have evolved.

But very little covering what we think will be the best way to write the code.

And then shows you how to write the code.

Gil Fink tackles Table Splitting in Entity Framework in the 10/12/2009 post:

Entity Framework include a lot of ways to customize the Entity Data Model. One such way is Table Splitting which enables to map multiple entity types to a single table. This post will show how we can achieve this ability. [Emphasis Gil’s.]

Alex James describes Code Only – Further Enhancements in this detailed 10/12/2009 tutorial:

We’ve come a long way since the last post on Code-Only. So it’s high time for another update.

We’ve been working really hard on Code-Only revving the design, and spotting missing capabilities and responding to feedback both internal and external etc. 

The current plan still holds.  Code-Only will not be in .Net 4.0 with the possible exception of the DDL features described in the last post.  For that portion, the implementation and requirements are more clear to us, and because making the DDL stuff work requires changes to things already in the .NET framework, and getting provider writers lined up, we are still working hard to get the DDL changes into .NET 4.0.  The rest of Code-Only will continue to evolve, and we will ship another preview or two, before getting it rolled into .NET as soon as we can after 4.0 ships.

Alex continues with the following topics:

    • API Refactoring
    • Foreign Keys
    • Missing Navigation Properties
    • Complex Types
    • Registering Entity Sets
    • Association Mapping
    • Interesting Column Names
    • Extracting the EDMX
    • Setting the StoreType
    • DDL Provider Model

Alex James posted Tip 37 – How to do a Conditional Include on 10/12/2009:

Someone asked how to do a Conditional Include a couple of days ago on StackOverflow.

They wanted to query for some entity (lets say Movies) and eager load some related items (lets say Reviews) but only if the reviews match some criteria (i.e. Review.Stars == 5).

Unfortunately though this isn’t strictly supported by EF’s eager loading, i.e. ObjectQuery<Movie>.Include(…) because Include(..) is all or nothing.

The workaround follows. (It’s obviously Alex James week on the Entity Framework team.)

LINQ to SQL

Ayende Rahien answers LINQtoSql Profiler & NHibernate Profiler - What is happening? in this 10/18/2009 post:

About two weeks ago I posted my spike results of porting NHProf to LINQ to SQL, a few moments ago I posted screenshots of the code that is going to private beta.

I spent most of the last week working on the never-ending book, but that is a subject for a different post. Most of the time that I actually spent on the profiler wasn’t spent on integrating with LINQ to SQL. To be frank, it took me two hours to do basic integration to LINQ to SQL. That is quite impressive, considering that is from the point of view of someone who never did anything more serious with it than the hello world demo, and it was years ago. The LINQ to SQL codebase is really nice. [Emphasis Ayende’s.]

Most of the time went into refactoring the profiler. I know that I am going to want to add additional OR/Ms (and other stuff) there, so I spent the time to make the OR/M into a concept in the profiler. That was a big change, but it was mostly mechanical. All the backend changes are done, and plugging in a new OR/M should take about two hours, I guess.

For LINQ to SQL, however, the work is far from over, while we are now capable of intercepting, displaying and analyzing LINQ to SQL output, the current LINQ to SQL profiler, as you can see in the screen shots, is using the NHibernate Profiler skin, we need to adapt the skin to match LINQ to SQL (different names, different options, etc).

That is the next major piece of work that we have left to do before we can call the idea of OR/Ms as a concept done, and release LINQ to SQL as a public beta.

Ayende Rahien’s LinqToSql Profiler private Beta - the screen shot gallery post of 10/18/2009 claims:

This is just to give you some ideas about what the new LinqToSql Profiler can do.

It can track statements and associate them to their data context, gives you properly formatted and highlighted SQL, including the parameters, in a way that you can just copy and execute in SQL Server:

Link Exchange shows How to Update a Database Using LINQ to SQL [Video] in this 10/12/2009 screencast, which follows the earlier How to Use LINQ to SQL to Query a Database [Video] of 10/12/2009.

The Developer Sneak Peak video includes a demonstration of LINQ to SharePoint and the Language Integrated Query (LINQ) for SharePoint section had a link to display sample LINQ to SharePoint code.

(This new feature undoubtedly explains why Aghy (Agnes Molnar) has been so quiet about her LINQ4SP project for the past few months and why Bart De Smet hasn’t rejuvenated his LINQ to SharePoint implementation.)

LINQ to Objects, LINQ to XML, et al.

The Data Platform Insider blog reports in its Get ready for SharePoint Conference Next Week! post of 10/16/2009 that SharePoint 2010 will gain a new LINQ to SharePoint implementation. Watch for the Developing with REST and LINQ in SharePoint 2010 (#SPC359 on Twitter) session when new SharePoint 2010 features are announced next week.

Miha Markic describes Dealing with iterations over null lists in LINQ to Objects in this 10/15/2009 post:

If you used LINQ to Objects you have certainly come across iterations over null values resulting in an ArgumentNullException being thrown at you.

Deborah Kurata continues her series on Lambda expressions in C# and VB:

and a related post:

See Sam Gentile’s Focusing on Data – Try #3 post of 10/13/2009 in the “Entity Framework” section, which describes how he came to the conclusion that he needed to understand SQL:

ADO.NET Data Services (Astoria)

Rick Anderson’s MVC FAQ post of 10/15/2009 provides an extensive FAQ about MVC and Dynanic Data.

Alex James continues his Entity Framework Tips series with Tip 38 – How to use CodeOnly with Astoria. See the Entity Framework section for details.

ASP.NET Dynamic Data (DD)

David Ebbo’s T4MVC 2.4.04 update: MVC 2 support, new settings, cleanup, fixes post of 10/15/2009 shows you where to get the latest build of T4MVC and describes the changes between version 2.4.00 and 2.4.04.

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

David Ebbo’s T4MVC 2.4.04 update: MVC 2 support, new settings, cleanup, fixes post of 10/15/2009 shows you where to get the latest build of T4MVC and describes the changes between version 2.4.00 and 2.4.04.

Sunday, August 10, 2008

LINQ and Entity Framework Posts for 8/8/2008+

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

Shawn Wildermuth Attacks the Reality of Data-Last Design in the Enterprise

Shawn’s Rigidity in Data Design post of August 9, 2008 is a thought-provoking essay about the validity of the ALT.NET members and Domain-Driven Development adherents contention that “that data is a top-down or at worse, bottom up design problem” and the assumption that greenfield persistence (database) schema are de riguer for most data-intensive development projects.

Shawn takes the position, with which I agree, that most data-driven development projects start with an existing database schema and a substantial amount of historical data. I estimate that nine out of ten projects that I’ve completed in the past 20 years worked extensively with existing business data on mainframes, minicomputers, and mid-range UNIX servers.

Shawn concludes:

No *rule* applies in all situations. I laud the ALT.NET guys for trying to inject better skills and tools into the process, I just rail against the ferocity of zealotry that comes in some of the message. When enterprise developers hear this, they just tune it out instead of taking what helps them and leaving the rest.

Added: August 10, 2008

Steve Naughton Adds Custom Row Rollover and Row Click Behavior to ASP.NET Dynamic Data Grid Views

His Customising GridView for Row Rollover and Click in Dynamic Data post of August 9, 2008 adds:

  • Background color change with mouse rollover
  • Row click navigation (e.g., to details view)
  • Row double-click navigation (e.g., to edit view)

to GridView controls in ASP.NET Dynamic Data projects. Steve’s prodigious output of code for customizing ASP.NET Dynamic Data projects goes far beyond what the Microsoft team has provided in documentation and blog posts so far.

Bart De Smet Offers LINQ Resources from Three of his Four Tech*Ed South Africa 2008 Sessions

Bart’s TechEd 2008 South Africa Demo Resources post of August 9, 2008 provide downloadable files and other resources from his two LINQ-related presentation and an additional Tech*Ed South Africa 2008 session:

  • DEV 305 – C# 3.0 and LINQ Inside Out
  • DEV 303 – Parallel Extensions to the .NET Framework
  • DEV 304 – Writing Custom LINQ Providers
  • MGT 301 – Next-Generation Manageability – Windows PowerShell and MMC 3.0

VS 2008 SP1 RTM Scheduled for Monday, August 11, 2008

Visual Studio 2008 Service Pack 1 will be available for download from the MSDN Subscriptions page "after August 11, 2008.”

If you have VS 2008 installed, don’t run SQL Server 2008 setup until after you install VS 2008 SP1 RTM bits.

For more information, see my VS 2008 SP1 RTM Scheduled for Monday, August 11, 2008 post of August 8, 2008.

Bill McCarthy Casts a List(Of DerivedClass) to List(Of BaseClass) with Generic Variance via an Extension Method

Bill starts his Generic variance and List(Of T) post of August 8, 2008 with:

Have you ever wanted to cast a List(Of Customer) to a List(Of BusinessBase), where Customer Inherits BusinessBase, only to find that you can't... well you can ;)

But his extension method uses reflection do it. (His post is an extension to his Inside Arrays article for in Visual Basic Magazine’s July 2008 issue.

For more information about Generic Variance see Variance in Generic Types (C# Programming Guide) article, Paul Vick’s A little update on VB10 thinking... post that says Generic Variance is on VB vNext’s radar, and Eric Lippert’s 11-part Covariance and Contravariance in C# blog series.

Don Kiely Describes Why Web Sites Running in Medium Trust Can’t Use Entity Framework v1

Don’s “Dynamic Data with the Entity Framework in Medium Trust” article for the ASP.NET Newsletter August 8, 2008 issue’s “Secure ASP.NET” column publicizes an ASP.NET Dynamic Data forum thread: Should Dynamic Data (Entity Framework model) work in medium trust?

The upshot of the thread is that the EntityDesignerBuildProvider throws exceptions the when run in medium trust on hosted Web sites. According to the Entity Framework team’s Diego Vega:

    1. The problem only affects Web Sites. Web Applications are not affected.
    2. Web Sites precompiled in full-trust and deployed to partial-trust apparently work.

Don and Diego suggest the same workarounds.

Thanks to Julie Lerman for the heads-up.

Ardenkantur Recounts Issues Using Entity Framework with Jaroslaw Kowalski’s Oracle Data Provider

His My Adventures with Entity Framework and Oracle post of August 8, 2008 describes issues with mixed-case versus upper-case table and column names, inability to specify column names in the EDMX file’s SSDL (storage) section instead of the mapping layer (MSL),  and use of ROWNUM clauses in Skip and Take operations.

The post is based on Jaroslaw’s EFOracleProvider described in his Sample Entity Framework Provider for Oracle post and available for download from under the Microsoft Public License (MS-PL), which isn’t intended for production use. However, users of commercial EF-enabled Oracle Managed Data Providers should watch out for the the problems Ardenkantur encountered in his pre-RTM test.

Pete Montgomery Demonstrates Caching the Result of LINQ Queries

In Caching the results of LINQ queries of August 8, 2008, Pete describes how to cache the result of LINQ queries that will will:

    • work for any LINQ query (over objects, XML, SQL, Entities…)
    • work for anonymous type projections, as well as business entities
    • be statically type safe (no casting required)
    • deal transparently with cache key creation
    • look syntactically like a custom query operator

He generates the unique cache key from the query expression.

Although Pete’s technique targets ASP.NET’s System.Web.Caching.Cache class, he says the approach “can be used by any .NET application or library.”

Note: Ayende Rahien (Oren Eini) has just completed a series of blog posts on distributed hash tables (DHT). His Patterns for using Distributed Hash Tables: Conclusion post of August 9, 2008 has links to the preceding eight episodes. If you’re interested in object caching in .NET, this series is a must-read.

Billy McCafferty Releases S#arp Architecture v0.7.3 Supporting ASP.NET MVC Preview 4 and NHibernate 2.0 CR 1

Billy’s S#arp Architecture: a new home, upgrades and a logo! post of August 8, 2008 announces the release of the latest version of S#arp Architecture: ASP.NET MVC with NHibernate (0.7.3), which supports ASP.NET MVC Preview 4 and NHibernate 2.0 CR1, and the formation of a S#arp Architecture Discussion Group on Google Groups.

He describes his new framework, which carries a GNU General Public License v3 license, as follows:

Pronounced "Sharp Architecture," this is a solid architectural foundation for rapidly building maintainable web applications leveraging the ASP.NET MVC framework with NHibernate. The primary advantage to be sought in using any architectural framework is to decrease the code one has to write while increasing the quality of the end product. A framework should enable developers to spend little time on infrastructure details while allowing them to focus their attentions on the domain and user experience. Accordingly, S#arp Architecture adheres to the following key principles:

  • Focused on Domain Driven Design
  • Loosely Coupled
  • Preconfigured Infrastructure
  • Open Ended Presentation

The overall goal of this is to allow developers to worry less about application "plumbing" and to spend most of their time on adding value for the client by focusing on the business logic and developing a rich user experience.

Billy is the author of NHibernate Best Practices with ASP.NET, 1.2nd Ed., which is required reading for anyone developing data-driven ASP.NET projects, regardless of whether you’re using or plan to use NHibernate, Entity Framework, LLBLGen Pro, or any other .NET Object/Relational Management O/RM tool.

Kingsley Idehen: OpenLink Software Publishes White Paper about LINQ to RDF

Kingsley describes Carl Blakeley’s LINQ To RDF: Exploiting the RDF based Linked Data Web using .NET via LINQ white paper of July 31, 2008 in his .NET, LINQ, and RDF based Linked Data (Update 2) post of August 8, 2008:

The paper offers an overview of LINQ to RDF, plus enhancements we've contributed to the project (available in LinqToRdf v0.8.). The paper includes real-world examples that tap into a MusicBrainz powered Linked Data Space, the Music Ontology, the Virtuoso RDF Quad Store, Virtuoso Sponger Middleware, and our RDfization Cartridges for Musicbrainz.

OpenLink Software is the publisher of Virtuoso, “an innovative Universal Server platform that delivers an enterprise level Data Integration and Management solution for SQL, RDF, XML, Web Services, and Business Processes.”

Amirthalingam Prasanna Offers a Introductory Guide to ADO.NET Data Services

His “Creating Service-Orientated Data-Access Layers” article of Redgate Software’s Simple-Talk newsletter of July 30, 2008 is yet another tour of ADO.NET Data Services but, unlike many other Astoria articles and blogs, it includes the basic details of query interceptors and change inteceptors for implementing role-based security.

Saturday, June 07, 2008

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

Tech•Ed Special: Daily posts during Tech•Ed Developers 2008 and possibly thereafter will be updated top-down during the day

Updated 6/7/2008: See Added and Updated posts below about SQL Server 2008 RC0, LINQ to SQL Partial Classes by Dinesh Kulkarni, LINQ to MSI from Bart De Smet, the Silverlight 2 Beta 2 release by Scott Guthrie, and a welcome extension method for the ObjectContext’s Include() method by Julie Lerman.

Updated 6/6/2008: See Added posts below about Silverlight 2 Beta 2 documentation by John Papa, Velocity by Dare Obasanjo, the JScript Date type by Marcelo Diego Vega, SubSonic progress by Rob Conery, and default values for ASP.NET Dynamic Data by Steve Naughton.

Aghy Moves LINQ4SP (LINQ for SharePoint) Download Site

According to her Important: LINQ4SP site moved! post of June 7, 2008, the new download site is here. I’ll correct the previous posts about LINQ4SP shortly.

Added: 6/7/2008

Julie Lerman Beat Me to a Post about Matthieu Mezil’s Extension to the ObjectContext’s Include() Method

So I’ll just link to Julie’s A better Include method for eager loading in Entity Framework? post of June 6, 2008.

I agree with both Mathieu and Julie that EntitySet and EntityType names as strings in EF is a bummer; his extension method replaces the string with a simple lambda function.

Update: A couple of hours later, Matthieu posted Entity Framework Include with Func next, which extends the preceding syntax to enable adding associated EntitySets to the Include() method:

context.Categories.Include(ca => ca.Products.Include<Products, Order_Details>(p => p.Order_Details).Include<Order_Details, Orders>(od => od.Orders))

Matthieu asks: “Isn’t it cool?”

Yeah, Matthieu, way cool!

Added: 6/7/2008

SQL Server 2008 RCO Available to MSDN and TechNet Subscribers

The Platform Insiders blog’s SQL Server 2008 RC0 now available for subscribers post of June 7, 2008 announces:

SQL Server 2008 RC0 has been made available for early download by MSDN and TechNet Plus subscribers. RC0 is the final step before SQL Server 2008 RTMs in Q3 of this year. After logging into their respective accounts, subscribers can view Product Keys and download SQL Server 2008 RC0 from the following links:

According to the Data Platform Insider's SQL Server 2008 RC0 Available for Everyone post of June 10, 2008, Bob Muglia announced at Tech*Ed that everyone can download the RC0 and it's Wha'ts New notes from:

  • Download SQL Server 2008 RC0
  • What's new in SQL Server 2008
  • Added: 6/7/2008 Updated: 6/10/2008

    Dinesh Kulkarni Recommends When to Use and How to add LINQ to SQL Partial Entity Classes

    His LINQ to SQL Tips 8: How to (and why) create a partial class in the designer to augment generated code. He also offers this tip about autogenerating a partial class for an entity:

    Right click on the design surface and click "View code" (don't ask me why that name was chosen for creating a new partial class). If I do that for Northwind.dbml (file opened in the designer), I get a Northwind.cs at a peer to Northwind.designer.cs.

    That’s a new one for me; thanks Dinesh.

    Added: 6/7/2008

    Bart De Smet Introduces LINQ to MSI

    Bart’s LINQ to MSI - Part 0 – Introduction of June 6, 2008 starts a series on the development of a LINQ to MSI implementation that doesn’t use the IQuerable interface. As Bart says, “MSIs are just little databases.”

    Added: 6/7/2008

    Danny Simmons Updates Entity Framework FAQ to v0.6

    Following are links to the updated and new topics in v0.6:

    Added: 6/6/2008

    Matt Berseth Offers Upgraded Grouping Grid Skins for an ASP.NET ListView Control and the LinqDataSource or EntityDataSource

    Ace server and AJAX control developer Matt Berseth has reskinned his grouping grid with CSS only as described in his 4 New Grouping Grid Skins: Vista, Bold, Win2k3 and Soft post of June 5, 2008. Here’s the Vista version:

    You can run a live demo here in Matt’s new ASP.NET Grouping Gallery.

    I haven’t tested the list control with the EntityDataSource, but I believe it should bind with little or no modification.

    Added: 6/6/2008

    David Sceppa Reports on Chalk Talk for Entity Framework Provider Writers

    Dave’s Entity Framework Provider Updates post of June 5, 2008 reports:

    The theater was so full with attendees that we ran out of seats. Representatives from DataDirect, IBM, Oracle and Sybase were in attendance.  Over the course of the chalk talk, we addressed a number of general questions before attendees spoke directly with the representatives from the various provider writers. DataDirect announced that they will release an update to their Oracle ADO.NET provider to support the Entity Framework in Q3 of 2008. Both IBM and Sybase demonstrated their provider's accessing their data stores via the Entity Framework.

    Perhaps Oracle has changed their collective mind and intends again to offer an Entity Framework-enabled version of OracleClient.

    John Papa Delivers a Primer on Silverlight 2 Databinding

    John’s detailed Data and Silverlight 2: Data Binding article dated June 5, 2008 for Red Gate Software’s Simple-Talk site is an excerpt from his forthcoming Silverlight 2 Data Binding book for O’Reilly.

    The Beta 2 data binding enhancements described in this What's new in Silverlight 2 Beta 2? post of June 4, 2008 by Silverlight project manager David Pugmire greatly increase the prospects for the use of Silverlight with line of business forms.

    Added 6/6/2008: John’s Silverlight 2 SDK Beta 2 Documentation post of June 5, 2008 announces that the docs are available here. It’s not at all common for Microsoft to release SDK docs before the corresponding runtime, so I assume we can expect the runtime and SDK with the Go Live license later today.

    Updated 6/7/2008: Sure enough. Scott Guthrie’s Silverlight 2 Beta2 Released post of 6/6/2008 (7:50 PM PST) announces the availability of the download of Microsoft Silverlight Tools Beta 2 for Visual Studio 2008, which installs:

    • Silverlight 2 Beta 2
    • Silverlight 2 SDK Beta 2
    • KB950630 for Visual Studio 2008 RTM or KB950632 for Visual Studio 2008 SP1 Beta
    • Silverlight Tools Beta 2 for Visual Studio 2008

    The preceding bits work with .NET 3.5 SP1 Beta 1.

    Silverlight Tools Beta 2 for Visual Studio 2008 includes:

    • Visual Basic and C# Project templates
    • Intellisense and code generators for XAML
    • Debugging of Silverlight applications
    • Web reference support
    • WCF Templates
    • Team Build and command line build support
    • Integration with Expression Blend
    • Enhanced Setup with upgrade support

    Updated 6/7/2008:John Papa’s What’s New in Silverlight 2 Beta 2 Tools post of June 6, 2008 hightlights these new features from Mike Snow’s detailed and fully illustrated What’s new with Silverlight Tools Beta 2! post:

      • There is much new added support for debug vs release builds of XAP’s. This includes:
      • You can now add a Silverlight 2 ready WCF project from a project template
      • When converting a project from Beta 1 to Beta 2, you will be prompted for conversion confirmation
      • XAML now reports error. Woohoo!!! (yes, I am easily satiated)

    Install Expression Blend 2.5 June 2008 Preview requires a separate installer.

    Updated 6/7/2008:Mike Tulty and Mike Ormond have updated their 52 screencam episodes on Silverlight development. Mike Taulty’s Silverlight 2 Beta 2 Available plus Refreshed Screencasts post of June 7, 2008 has links to the updated player and files.

    Josh Heyse Extends the LinqDataSource to Support a Richer DynamicFilterRepater for ASP.NET Dynamic Data

    Another from the How Did I Miss This? department: Josh, who’s a developer for Catalyst Software Solutions in Chicago, wrote a four-episode series about A Richer DynamicFilterRepeater for ASP.NET Dynamic Data.

    The project grew out of Josh’s desire to use the feature on a new RAD Web site project:

    The project is a short duration web site with fairly standard data entry, searching, and detail views. The Dynamic Data Framework fit the requirements well except that the dynamic searching controls did not have the required features needed for the project. I started investigating how hard it would be [to] add the following search features:

    • Searching ranges (ListPrice > 10 AND ListPrice < 500)
    • Searching in a list of possible values (Class in (‘L’, ‘M’))
    • Partial text searching (Color LIKE ‘B%’)

    Here are links to his initial four posts:

    Josh updated the code to the April 2008 release and added a ColumnContains control with these two posts:

    Josh made the following comment in the ASP.NET Dynamic Data forum about the development time saving gained by using ASP.NET Dynamic Data:

    I believe .. Dynamic Data in conjunction with LINQ-to-SQL reduced our development time by about 40%. [Emphasis added.]

    A nice vote of confidence for this new ASP.NET RAD feature.

    Parallel Extensions Team Produces Two-Part Channel9 Video Series on Parallel Fx

    The deck for the series says:

    Here, we meet some of the key engineers of the Microsoft Parallel Computing Platform (which includes the Parallel Extensions for .NET...): Lead Developer Joe Duffy, Developer Huseyin Yildiz, Developer Igor Ostrovsky, Program Manager Stepehn Toub and Program Manager Ed Essey.

    We dig deeply into a lot of topics related to parallelism and conconcurency and how the new additions to the platform enable developers to exploit multi/many core processors in an elegant way.

    Following are links to the two episodes:

    PLINQ and Parallel Fx Ray Tracing Demos Included in June 2008 Parallel Extensions CTP

    The Parallel Fx June 2008 CTP includes two additional ray tracing sample built on the two original ray tracers developed by Luke Hoban and described in the "Luke Hoban Gets the Most Complex LINQ Query Award (and PLINQ Compatibility)" topic of my LINQ and Entity Framework Posts for 10/2/2007+ post.

    You can read more about the new samples in the Parallel Fx team’s Ray Tracer samples in the June 2008 CTP post of June 5, 2008

    Managed Extensibility Framework for Dependency Injection/IoC CTP Released to Code Gallery

    Here’s how the Code Gallery Home page for the Managed Extensibility Framework describes the June 4, 2008 release:

    The Managed Extensibility Framework (MEF) provides developers with a tool to easily add extensibility to their applications and with minimal impact on existing code. The application developer can define extension points according to the functionality required of an extension, while the extension developer uses those points to interact with the application.

    MEF enables this extensibility to take place without creating a hard dependency in either direction. Applications can be extended at run time without recompilation, and extensions can be used by multiple applications sharing the same extension requirements. MEF also allows an application to delay the loading of an extension while still examining its metadata, enabling efficient traversal of large catalogs of extensions.

    In other words, it’s a Dependency Injection Pattern/Inversion of Control Container for .NET.

    Steve Naughton Provides SQL Server 2005 Versions of His ADO.NET Dynamic Data Attribute-Based Permission Series

    You can download an archive with either SQL Server 2005 or 2008 from Steve’s new Update to Visual Studio 2008 Project Files post of June 5, 2008. The original files required SQL Server 2008.

    Added 6/6/2008: Steve’s DynamicData ForegnKey_Edit Default Values post of June 6, 2008 shows two approaches to providing Insert forms with default values for foreign key values.

    Nithya Sampathkumar Outlines Velocity STP1 Features in New Team Blog

    Nithya’s Project "Velocity" CTP1 Features post of June 4 provides a detailed outline of the capabilities of this new distributed cache framework. You can download the Velocity bits, checkout the new Velocity forum, and get samples from links on the Data Platform Developer Center’s Velocity page.

    The Data Platform group appears to be producing almost all new Microsoft frameworks.

    Updated 6/6/2008: Dare Obasanjo provides a detailed analysis of Velocity in his Velocity: A Distributed In-Memory Cache from Microsoft post of June 6, 2008. Many points he raises apply to the general topic of caching objects in memory, not just distributed caches.

    Marcelo Diego Vega Explains JavaScript Date Type Strangeness

    JavaScript’s Date type combines local and UTC times in a single variable, which confuses many new users of ADO.NET Data Services JSON serialization. Marcelo’s JavaScript Date, UTC and local times post of June 4, 2008 explains how to use JavaScript Date methods, such as toString() and toUTCString().

    Added 6/6/2008: Marcelo’s second post about the JavaScript Date type is JavaScript Date and ADO.NET Data Services of June 6, 2008.

    Rob Conery Close to Completing LINQ to SubSonic

    In his SubSonic: RIP? post of June 4, 2008, Rob says rumors of the death of his SubSonic scaffolding platform for ASP.NET are greatly exaggerated. In fact, the SubSonic 2.1 Release Candidate 1 became available yesterday. Rob goes on to note:

    Today, as a matter of fact, I'm tackling (and hopefully solving) one of the core IQueryable bits that's holding me back from a full Linq To SubSonic implementation. It's not easy, this LINQ stuff, but I'm getting there!

    Rob also makes it plain that SubSonic != ASP.NET Dynamic Data, although he does recognize that the products have a great deal of overlap.

    You can read more about SubSonic here. Like Ruby on Rails, SubSonic uses the ActiveRecord pattern and includes a scaffolding feature.

    Added 6/6/2008: Rob added a very detailed post about SubSonic 2.1’s Migrations feature that mimics Ruby on Rails database schema updater of the same name in SubSonic: Using Migrations of June 5, 2008.

    SharePoint Extensions v1.2 for Visual Studio Available for Download

    Get Windows SharePoint Services 3.0 Tools: Visual Studio 2008 Extensions, Version 1.2, which Paul Andrew announced on June 4, 2008. And, if you don’t already have it, download Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions User Guide, Version 1.1 to learn how to use the tools. The VS 2008 version has the same feature set as that for VS 2005.

    SharePoint and its Web Parts are becoming increasingly important as the presentation layer for data-intensive applications. These extensions consist of:

    Tools for developing custom SharePoint applications: Visual Studio project templates for Web Parts, site definitions, and list definitions; and a stand-alone utility program, the SharePoint Solution Generator.

    For fledgling SharePoint developers, there’s a Silverlight-enhanced New Introductory SharePoint web site for .NET Developers that offers a detailed Introduction to SharePoint Products and Technologies for the Professional .NET Developer whitepaper and links to other WSS 3.0 resources. Quickstarts and Screencasts are “coming soon.”

    SQL Server 2008 Plus Other Servers and Tools Get a New Logo

    According to the The Data Platform Insider blog’s New logo for SQL Server® 2008 post of June 5, 2008:

    The Microsoft branding team unveiled an official new logo for SQL Server 2008 at TechEd 2008. The new symbol portion of the logo (officially called "dynamic grid symbol") is part of a larger branding strategy designed to help customers and partners distinguish server products in Microsoft’s overall product portfolio.

    Other members of the Server and Tools Group’s product line will use the same “dynamic grid symbol” in different colors.

    Tuesday, May 06, 2008

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

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

    Eugenio Pace Packages LitwareHR for use with Your SQL Server Data Services Account

    The LitwareHR on SSDS available for download post of May 6, 2008 delivers the final version of Eugenio's Son of LitwareHR for SQL Server Data Services (SSDS). You'll need an SSDS account to make use of the software.

    In Paging in SSDS & Parallel Queries of May 5, 2008, Eugenio explains that:

    SSDS currently supports a very simple paging pattern that uses the entityId. By design, the first 500 entities will be returned, but the entities will be returned in entityId order. ...

    [Y]ou could add an extra parameter to specify the maximum amount of total entities you are expecting as a result, monitor the amount retrieved by each thread and cancel any outstanding (parallel) queries if the limit is reached.

    Dinesh Kulkarni Continues His LINQ to SQL Tips Series

    In LINQ to SQL Tips 3: Deferred (lazy) or eager loading of related objects with stored procs of May 5, 2008, Dinesh explains how to override LoadEntitySet() methods to have stored procedures return associated entities.

    Dinesh also answers the long-standing question of what Microsoft team he's on now in From LINQ team to App Framework on Silverlight team of May 4, 2008.

    Jim Wooley Tells All About Migrating to LINQ

    The geekSpeak recording: LINQ Migration Strategies with Jim Wooley podcast announcement of May 7, 2008 comes with this abbreviated abstract:

    Our guest Jim Wooley has a longtime background with databases, coming out of the Access and Foxpro world. He shares his insights about how the advent of LINQ brings with it a new paradigm for working with data. This geekSpeak will get you thinking about data access in different ways - about a functional approach that's less about iterative manipulation - plus how this type of data access will find its home in future technologies like Silverlight.

    Don't miss it.

    Cynot: Why Not Use LINQ to Query Request.ServerVariables Output?

    Tony Cavaliere's Request.ServerVariables, the LINQ way shows you how to write LINQ queries against objects of the NameValueCollection data type.

    Matt Warren Adapts LINQ to SQL for Unit Tests with Mocks

    This cutesy play on mach nicht (don't) disguises one of Matt's better hacks. His Mocks Nix - An Extensible LINQ to SQL DataContext post of May 5, 2008 provides the code to create an ExtensibleDataContext, a proxy that acts as an interceptor and "redirect[s] the calls back to methods on the DataContext that can be overridden," it's private provider variable in this case. "Instead of executing the query, I write out a simple message and return an empty collection."

    Unit Tests Added to LINQ to Flickr by Mehfuz

    Mehfuz's LINQ.Flickr 1.3 post of May 5, 2008 announces a udate to LINQ to Flickr "with several bug fixes, code optimization, new feature and overall mocking support."

    He says:

    I have used Typemock for the unit test of the product. In coming posts, I will show how powerful mock can be in faking routine like upload photo. But, you can dig it right away, if you go by the release page and download a copy of the product. Truly speaking, testing was never fun for serviced API till mock engine is at my hand.

    The release is not all about re-factoring and mocking , but now you can query, add , delete photo comment , query people and popular tags and do more that are mentioned in the release page.

    Mefuz is the developer of LINQExtender, a toolkit for creating custom LINQ implementations by focusing on the business logic rather than on writing code. LINQ to Flickr is an example of a LINQ provider created with the toolkit.

    Sidar Ok Offers Tips for Speeding LINQ to SQL Performance

    His 10 Tips to Improve your LINQ to SQL Application Performance post of May 2, 2008 delivers basic, but fundamentally sound advice for making your LINQ to SQL queries perform efficiently.

    Yet Another Entity Framework Intro Piece

    Ben Hall's Introducing the ADO.NET Entity Framework article for the May edition of UK's VSJ magazine covers "Creating your model" and "Querying the model" with brief excerpts from SSDL, MSL and CSDL files and code for executing Entity SQL queries against the EntityClient and Object Services layers, and issuing Entity SQL queries.

    A Jewel from the Past: Bart De Smet on LINQ to SharePoint

    Bart De Smet introduces his LINQ to SharePoint implementation in MSDN Webcast: geekSpeak: Using LINQ to SharePoint with Bart De Smet (Level 200) of October 31, 2007. Now that Bart's working for Microsoft, he doesn't appear to be updating the project. The current release is dated November 11, 2007.

    Tuesday, April 29, 2008

    LINQ and Entity Framework Posts for 4/28/2008+

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

    Matt Davey: Investment Banking Needs PLINQ

    In his Parallel Extensions to the .NET Framework article of April 23, 2008 for Dr. Dobbs Portal, financial services developer Matt Davey discusses Microsoft Research's Dryad Network and DryadLINQ and suggests using a C# 3.0 extension method to use PLINQ to submit work to a DigiPede Distributed Computing Network. Matt concludes:

    Sitting in the financial vertical, PLINQ can't be released quickly enough. As long as banks understand the implications, PLINQ will improve the trading cycle. Microsoft, however, needs to continue to push in the concurrency field, making developers' lives easier by giving them access to cores locally as well as remotely, and ensuring that the development/debugger tools keep up with the library as it advances.

    Added: 4/29/2008

    Julie Lerman Creates an Extension Method to Visualize EntityStateObjects

    Julie's An extension method for visualizing EntityStateObjects post of April 29, 2008 shows the design and provides the source code to simulate a debugger visualizer for the current EntityStateObject. The EntityStateObject isn't serializable, so she wrote an extension method with the DEBUG ContitionalAttribute to prevent it from appearing at runtime.

    Bravo, Julie! And thanks for the source code.

    Added: 4/29/2008

    Rob Conery Implements a Repository+ Pattern by Passing Out an IQueryable<T>

    Rob starts a controversy by redefining the Repository pattern to a Repository+, which outputs IQueryable<T>. With help from Oren Eini (Ayende Rahien), Rob adds a LazyList<IQueryable<T>> to provide lazy-loading generic list without relying on LINQ to SQL's built-in lazy loading feature.

    He then goes on to discuss with John Galloway the use of HTML and CSS in ASP.NET MVC to create a UI for the project replacing tables with divs for layout.

    Added: 4/29/2008

    Randolph Cabral Continues His LINQ to SQL n-Tier Series

    Exploring N-Tier Architecture with LINQ to SQL (Part 2 of n) of April 29, 2008 proposes wrapping a LINQ to SQL NorthwindDataContext object with a NorthwindBusinessContext to decouple the DataContext from the business layer and adds GetCustomerById() and PersistState() methods to more closely resemble the ActiveRecord pattern.

    Added: 4/29/2008

    Google Engineer Admits the App Engine Has Latency Problems Reading and Writing Datastore Entities

    Perhaps apps running on the Google App Engine aren't as scalable as one might assume. According to Ken Ashcroft, a Google software engineer, who wrote Tips on Writing Scalable Apps of April 29, 2008:

      • Avoid contention on datastore entities. If every request to your app reads or writes a particular entity, latency will increase as your traffic goes up because reads and writes on a given entity are sequential. One example construct you should avoid at all costs is the gobal counter, i.e. an entity that keeps track of a count and is updated or read on every request. There are some interesting ways of simulating this behavior that don't require reads/writes on every request, and we'll talk about a handy way to cache entities for reads below.
      • Avoid large entity groups. Any two entities that share a common ancestor belong to the same entity groups. All writes to an entity group are sequential, so large entity groups can bog down popular apps quickly if there are a lot of writes to that group. Instead, use small, localized groups in your design.
      • Write sparingly. Writes are more expensive than reads; keep this in mind when designing your data model. If you can avoid a write--it's best to do so.

    Added: 4/29/2008

    Charlie Calvert Seeds the LINQFarm with an IEnumerable<T> Series

    C# community evangelist Charlie Calvert starts another multipart LINQFarm series with LINQFarm: Understanding IEnumerable<T>, Part I, which (as you'd expect) covers the IEnumerable<T> interface.

    The second member of the series promises to answer "What is it about IEnumerable<T> that makes it a useful data source and return type for LINQ to Objects queries?"

    Added: 4/29/2008

    Phil Wainewright Translates Steve Gillmor's Live Mesh Accolade

    Phil's Gillmor: Why Google should worry about Live Mesh post of April 28, 2008 summarizes Steve's sometimes rambling 1,000+ words from his surprisingly effusive TechCrunch article, Microsoft Says Yes With Mesh of April 27:

    Other commentators have dismissed Mesh as simply a mechanism to protect Microsoft’s desktop-bound assets, but Steve turns that around and points out that what Mesh is really about is connecting the desktop into the cloud (Meshing the desktop into the cloud, as I wrote last Thursday).

    Call it self-serving if you like, but Microsoft needs a bridge that will carry its existing market presence over into the cloud and Mesh is that bridge. You could equally call it customer-friendly: Microsoft users will likely be pleased to have a mechanism that helps them make that transition without orphaning their desktop and on-premise IT assets.

    Robert Scoble has a shorter translation in Mind Meshing with Steve Gillmor of April 27, 2008:

    The only good excuse I’ve heard so far why Microsoft Mesh isn’t interesting is “I hate Microsoft.”

    That’s a tough thing to overcome, but I thought Steve Gillmor was one of those who hated Microsoft too. After all, he bought a Mac and kept repeating on his blog “Office is dead.”

    But, let’s translate Gillmor: Microsoft Mesh is fascinating. Agreed.

    Steve didn't sound all that enthusiastic about Live Mesh during the Gillmor Gang's interview podcast with Dave Treadwell that I reported in the "Sync Guru (Rafik Robeal) Questions the Problems Live Mesh Will Solve" section of LINQ and Entity Framework Posts for 4/21/2008+.

    Note: If you're wondering why Live Mesh is germane to the usual topics of this blog, it's because it includes a LINQ implementation ("LINQ to Mesh") and of the potential interaction of Live Mesh with ADO.NET Data Services and SQL Server Data Services (SSDS) as a primary data sources. (Updated 4/29/2008)

    Update 4/29/2008: Ori Amiga attempts (but fails) to execute a LINQ to Mesh query against Mesh objects at 47:25 into the Ori Amiga: Programming the Mesh Channel 9 video segment of April 24, 2008. Starting at about 50:00, he shows the code for a typical LINQ query and mentions that the Mesh team is working with the Astoria folks to make sure their query and URL syntaxes are the same.

    Other Channel9 videos about Live Mesh:

    Bart DeSmet Follows Up on His TechDays Sessions on IQueryable

    His Q: Is IQueryable the Right Choice for Me? post shows you how to:

    [C]reate your own query pattern implementation by means of instance methods ... by providing an entry-point like Table<T> and further providing a fluent interface pattern that produces Query<T> objects in a chained manner.

    as an alternative to implementing IQueryable<T>.

    It's nice to see Bart returning to posts about LINQ.

    Dinesh Kulkarni Has Resumed Posting about LINQ to SQL

    After more than six months of silence following his move "I have moved to another project with the developer division at Microsoft (more about that on a sunny day)" reported in his LINQ to SQL: What is NOT in RTM (V1) post of October 15, 2007, Dinesh posted Lifetime of a LINQ to SQL DataContext on April 27, 2008.

    Apparently the sun hasn't shone in Redmond since mid-October.

    His latest post provides guidelines for answering the question of whether the DataContext should be short- or long-lived.

    As I said in my comment: Welcome back!

    Eugenio Pace Produces Screencast of LitwareHR Using SSDS

    End to end demo of LitwareHR on SSDS provides an 11-minute screencast of LitwareHD using SQL Server Data Services instead of SQL Server 2005 as the back-end datastore. Eugenio divides the screencast into two acts:

      1. Tenant Provisioning and customization (takes the first 5 min approximately). I show the initial tenant provisioning (creation of a new tenant in LitwareHR, initial configuration, etc) and then a basic customization (e.g. look & feel, position entity shape, etc). You'll notice that I switch back and forth between www.litware.com and SSDS to show how entities look like in the store.
      2. Using the new created instance (this takes the last 6 min). I show a hypothetical recruiter logging-in, opening new positions, then an applicant browsing the open positions and submitting a Resume and finally the recruiter browsing the posted applications. Again, you'll see how do these entities look like in SSDS.

    Here are Eugenio's introduction and six-part tutorial about moving LitwareHR to SSDS:

    Barry Gervin Starts Yet Another Entity Framework Series

    His kickoff, The Entity Framework vs. The Data Access Layer (Part 0: Introduction) of April 27, 2008, explores the roles of a data access layer (DAL, not necessarily a tier) and lays out questions related to it's implementation.

    Barry promises that in Part I:

    I'll explore the idea of the Entity Framework replacing my data access layer and evaluate how this choice rates against the various objectives above. I'll then continue to explore alternative implementations for a DAL using the Entity Framework.

    Liam Cavanagh Offers Sync Framework Tutorials

    In apparent response to the increased interest in data synchronization spiked by Live Mesh, Liam's New Sync Framework Tutorial of April 28, 2008 offers the following four projects:

    • Sync101 With Metadata Store – Demonstrates a basic provider for an in-memory data store (replica) that uses the SqlCeMetadataStore class to store the metadata in a SQL Server Compact Edition database.

    • Sync101 Refactored – Factors out the replica-specific code from the code common to any provider in preparation for the next step of adding an additional provider. Also uses a more flexible transfer mechanism class to allow accommodation of more complex schemas.

    • Sync101 Add Xml Provider – Adds a new provider that represents a data store comprised of XML files.

    • Sync101 Add Csv Provider – Adds a new provider that represents a data store containing Comma-Separated Values (CSV) files and also uses XML configuration files to specify the transfer mechanism class properties and the property mappings between providers.

    You can download the source code from the MSDN CodeGallery.

    Julie Lerman Unveils the Forthcoming ASP.NET EntityDataSource Control

    Repeated from: LINQ and Entity Framework Posts for 4/21/2008+

    Danny Simmons demonstrated the EntityDataSource control at the MVP Summit 2008 and Julie shares her notes in Sneak Peek at the EntityDataSource Control of April 27, 2008. The EntityDataSource control is the Entity Framework's answer to LINQ to SQL's LinqDataSource control for databinding ASP.NET GridView, ListView and other bindable server controls.

    Two important EntityDataSource control features that Julie describes are:

    Although I don't remember seeing it during the session, Danny did say that you can choose to eager load related data in the same way that you can with the Include method. I don't know how this is done or if it will impact updating, but I don't know why it would.

    One of the most interesting things about the EntityDataSource is that along with its' ability to perform server side paging, it also performs client side caching - of current AND original data. The original data is not stored as complete objects, but the minimal data necessary to reconstruct state when it's time to update. Updates happen, like any other data source, one at a time. So you have to pick an item, edit it and update it.

    Availability of the EntityDataSource control will enable ASP.NET Dynamic Data scaffolding to use EF as an alternative to LINQ to SQL as its data source. (See David Ebbo's Dynamic Data at MIX, and upcoming changes post of March 6, 2008.

    Hopefully, the EntityDataControl won't share the problems with the LinqDataControl that Julie described in her January 22, 2008 Thinking about the EntityDataSource post.

    Note: The link to the OakLeaf blog in the latter post goes to the home page. Julie might have intended to link to go to the Problems Using Stored Procedures for LINQ to SQL Data Retrieval (Updated) post of October 2, 2007. That post contains a "Problems with Stored Procedures That Affect ASP.NET Projects Only" section, which covers sorting and paging problems.

    Thursday, January 31, 2008

    SD Times' "Does .NET With LINQ Beat Java?" Article Raises More Questions Than It Answers

    David Worthington's Does .NET With LINQ Beat Java? Software Development Times article of January 30, 2008 has a snappy head but the article's deck, "Framework's data query capabilities give it an edge, experts claim," appears to be disputed by at least one "expert," namely Jonathan Bruce of DataDirect Technologies (see below.)

    Worthington quotes Jonathan as saying:

    DataDirect’s Bruce acknowledged that from a productivity point of view, LINQ combined with its tooling gives .NET shops a productivity advantage that the Java community cannot match. He credits Microsoft’s ability to “package [productivity patterns and tooling] all up into something useful."

    That said, he noted that LINQ is an unproven technology that is new to the market and said that he could not imagine anyone making corporate bets on LINQ just yet. “On the Java side, data access is rounded and stable. As a technology officer, it is an easier bet to make [on] what will reduce risks from a data perspective,” he explained. [Emphasis added.]

    If Bruce "could not imagine anyone making corporate bets on LINQ just yet," why has DataDirect announced their intention to provide EntityClient-enabled ADO.NET data providers for the Entity Framework? Java's "rounded and stable" data access sounds to me like an apologia for the status quo (a.k.a. JDBC).

    Apparently, Bruce isn't aware of LINQ to Objects, LINQ to XML, and the widening variety of current third-party LINQ implemetations and upcoming Microsoft versions:

    Another example is XQuery, a language designed to query XML data. XQuery, he said, does a better job with data from many venues because of XML’s flexibility. By contrast, he claimed, the current implementation of LINQ is very targeted to what the developer is querying and the ability to “mash up data sources” has not been delivered yet, Bruce explained.

    One of LINQ's strong points is it's "ability to 'mash up data sources'." Jon Udell's LINQ 101 post of September 28, 2005 demonstrated a three-way join between an XML data source and two CLR objects with the PDC 2005's LINQ preview. You can now join generic sequences from sets of in-memory objects (LINQ to Objects), XML documents, relational databases (LINQ to SQL and LINQ to Databases), and other domains with LINQ to SharePoint, LINQ to ActiveDirectory, LINQ to Amazon, and LINQ to Streams. If this capability for joining IEnumerable<T> sequences doesn't enable mashups, I don't know what does.

    I find LINQ to XML to be a much more approachable and practical method for querying and composing XML Infosets than XQuery and/or XSLT. It's interesting that Microsoft is working on LINQ to Stored XML to supplement or replace its pre-XQuery 1.0 implementation for the SQL Server 2005+ xml data type.

    Note: I have some questions about Bruce's prognostications in the "Jonathan Bruce's Data Services and LINQ Crystal Ball Appears a Bit Cloudy" topic of LINQ and Entity Framework Posts for 1/28/2008+.

    Tuesday, October 30, 2007

    LINQ and Entity Framework Posts for 10/29/2007+

    More Tidbits from Julie Lerman: An Upgrade to the EDM Designer and QueryViews vs. Defining Views

    Julie's Another tidbit from the forums.. what's coming in the EDM Designer post of November 2, 2007 quotes the ADO.NET Team's Noam Ben Ami:

    We are hard at work on this feature right now and hopefully we'll be able to get it into CTP2 of the designer.

    Along with support for stored procedures, it is our highest priority.

    and offers three prognostication of things to come for the EDM Designer.

    EDM QueryViews vs Defining Queries (and read-only views) of the same date explains in great detail the difference between a QueryView that you specify in the mapping layer (MSDL) and a Defining Query for which you write the T-SQL in the physical layer (SSDL).

    Added: November 3, 2007

    A QueryDataSource Replacement for the LinqDataSource

    Bernal Schooley's LINQ : Paging and sorting LINQ Queries with a custom QueryDataSource post of November 3, 2007 describes the LinqDataSource as "the Linq equivalent of the SqlDataSource, something many people avoid at all costs." His custom QueryDataSource server control handles server-based paging and sorting for ordinary LINQ queries and, unlike the LinqDataSource, isn't connected at the hip to LINQ to SQL.

    Bernal has a brief but interesting series of posts on LINQ to SQL starting in late September 2007.

    Added: November 3, 2007

    Julie Lerman: Handling DB Schema Changes with the Entity Data Model Designer

    One of the primary selling points of the Entity Framework (EF) and its Entity Data Model (EDM) is the ability to deal with minor changes to the underlying database's schema with edits to the XML files for the physical (SSDL) and mapping (MSDL) layers. You don't need to alter source code and recompile your data layer.

    Julie's Entity Data Model - What to do when a change is made in the database of November 2, 2007 demonstrates how to edit the SSDL and MSDL files with the Beta 2 version of the EDM Designer. In this case the changes are to the names of two columns. Things get a bit trickier when DBAs make structural changes to the schema, such as splitting or consolidating tables.

    Added: November 2, 2007

    Beth Massi Posts Four New LINQ to XML Video Segments

    Beth's New Visual Basic LINQ to XML Videos Released! post of November 2, 2007 describes four new video clips that "walk you through the basics of LINQ to XML, creating, querying and transforming documents as well as how to import XML namespaces and infer schemas to enable IntelliSense." The last video covers the LINQ to XML application described in the "Beth Massi Moves Excel Data to and from SSCE with LINQ to XML" topic below.

    Beth's post also includes an updated set of links to her previous LINQ to XML articles.

    Added: November 2, 2007

    Multi-Tier Improvements Coming to Entity Framework

    Julie Lerman reports in her A hint of what to look for in Entity Framework Beta3 post of November 1, 2007 that the ADO.NET team intends to make the EntityKey for 1:m associations (EntityRefs) serializable for WCF messaging. 

    I assume in my Multi-Tier Improvements Coming to Entity Framework post of November 1, 2007 that the DataContractSerializer serializes both EntitySet(s) and EntityKey(s), but it's not entirely clear from Brian's statement that Julie quotes.

    Added: November 1, 2007

    Zlatko Michailov's Entity SQL Tip #1: No JOINs

    Entity SQL Tip #1: A well defined query against a well defined entity data model does not need JOIN.

    Navigation properties in combination with nesting sub-queries should be used instead. These latter constructs represent task requirements much more closely than JOIN does. That makes it easier to build and maintain correct Entity SQL queries.

    Added: November 1, 2007

    Julie Lerman Demystifies Creating Associations in the EDM Designer

    If you don't have a predefined primary key:foreign key relationship predefined for a pair of related tables your mapping with the Entity Framework's Entity Data Model (EDM) designer, establishing the relationship with the designer is a painful process to some and a complete mystery to most folks. For this reason, Entity Framework pilgrims usually set up the relationships for all their tables' foreign keys in the SQL Server Management Studio [Express] Foreign Key Relationships dialog before starting the mapping process. If you're working with a database that's not under your control, you probably don't have the ALTER TABLE privileges necessary to add foreign key constraints and enforce referential integrity.

    Julie comes to the rescue with another lavishly illustrated set of step-by-step instructions in her October 31, 2007 Mapping Associations in the EDM Designer post. Her tutorial for establishing a one-to-many relationship between two tables in the EDM designer keeps you out of the sand traps and away from the water hazards that the ADO.NET folks appear to have added just to make the process of setting navigation properties "interesting." Thanks, Julie.

    Added: November 1, 2007

    All's Quiet on the Project Jasper Front

    Project Jasper was one of the ADO.NET team's next big things at the MIX 07 conference. There now seems to be a serious question about a Project Jasper CTP for Visual Studio 2008 RTM. Read more in my Has Project Jasper Been Swallowed by a Black Hole? post.

    Added: November 1, 2007

    Update 11/2/2007: Andrew Conrad left a detailed comment about the current status and future of Project Jasper. Andy notes in the comment that he's the Dev Lead for Astoria and still the Dev Lead for Project Jasper and LINQ to DataSet.

    Beth Massi Moves Excel Data to and from SSCE with LINQ to XML

    Most folks use Microsoft Access to import Excel workbooks into .mdb/.accdb files or SQL Server tables and Excel itself to import data from Access tables. But Beth picked SQL Server Compact Edition (SSCE) v.3.5, which has managed (System.Data.SqlServerCe) and OLE DB (Sqlceoledb35.dll) drivers but doesn't have the old-timey ODBC driver that Access requires.

    So Beth's Quickly Import and Export Excel Data with LINQ to XML of October 31, 2007 post starts by copying the XML document for a dummy row from an Excel 2003 XML file and pasting it to VB 9.0's text editor (preceded by Dim sheet = ) and adding five Imports statements for the namespaces. She then replaces the dummy data with embedded expressions, and adds a query expression to import Northwind Customers data from an SSCE database into a new document and save it as Customers.xml. Finally, Beth demonstrates how to export data from Customers.xml back into the SSCE table.

    I'm not so sure about the "Quickly" adverb, but it's an interesting example of LINQ to XML's capabilities and shows you why Silverlight ultimately will include LINQ to XML.

    Note: Beth's smashed finger must be healing because this post is longer than some of mine.

    Added: October 31, 2007

    Rick Strahl's and My Issues with WCF WSDLs and LINQ

    Rick Strahl observes in his WCF and segmented WSDL Files = Problems post of October 30, 2007 that the Web Service Definition Language (WSDL) documents generated by Windows Communication Foundation (WCF) Web services include a <wsdl:import namespace="someNamespace" location="uRLforWSDL"> element, which limits interoperability with more mature Web service clients. 

    Apparently, Rick and I are working on similar WCF serialization techniques for LINQ to SQL entities. My Serializing Cyclic LINQ to SQL References with WCF of October 30, 2007 describes additional problems with serializing cyclic references with WCF's DataContractSerializer and the lack of standards for bidirectional serialization with id and idref attributes.

    Added: October 30, 2007

    Frans Bouma and LINQ to LLBLGen Pro: Part 8

    It appears to me that Frans is making good progress in "trimming his expression tree" with reduction code. As Frans notes, his "current code can recognize predicates, field expressions, joins (not group joins yet), can evaluate local variables into values used into predicates, projections of single fields and entity projections" from his sample query:

    string city = "Munchen";
    var q = from c in metaData.Customer
            join o in metaData.Order
               on c.CustomerId equals o.CustomerId
            join od in metaData.OrderDetail
               on o.OrderId equals od.OrderId
            where c.City == city && c.Country == "Germany"
               && o.EmployeeId == 2 && (od.Quantity * od.UnitPrice) > 500
            select (o.EmployeeId > 10);

    Frans provides screen captures of his custom Expression Tree Visualizer during the seven states from State 0 - Start to State 6 - The final tree has been reduced by combining select expressions.

    Added: October 30, 2007

    Julie Lerman Discovers Silverlight 1.1 Doesn't Support LINQ to XML or WCF (Yet)

    Julie's Silverlight 1.1 - Look before you leap (into LINQ or into WCF) post of October 30, 2007 laments not researching the status of LINQ to XML and WCF in the current bits before .

    I made the following comment in the "Julie Lerman to Present Sessions on Astoria at REMIX Boston and New England Code Camp" topic of my LINQ and Entity Framework Posts for 10/29/2007+ post:

    Her resultsets are formatted as plain-old-XML (POX), which will be replaced by Microsoft's new Web3S XML format in a later CTP. Silverlight 1.1 has an Astoria client library; XML-formatted data is one reason that a future Silverlight version will include LINQ to XML. (Emphasis added.)

    I quoted more about future Silverlight support for LINQ in the "Scott Guthrie on Using C#'s (New?) null Coalescing (??) Operator with LINQ to XML" topic in my LINQ and Entity Framework Posts for 9/14/2007+ post:

    Tim Anderson posted on 9/19/2007 an interview with Scott, Scott Guthrie on .NET futures, conducted at the MIX07 UK conference held in London on September 11-12, 2007. Tim's September 11, 2007 Silverlight at Mix07 UK post mentions in his "Web service support and LINQ" section:

    "Silverlight will support JSON, WCF and SOAP. It will also include LINQ, with the possibility of creating custom LINQ data providers - Guthrie mentioned possibilities like a LINQ provider for Amazon’s S3 service."

    And here's an early reference from my MIX07 Session Videos with LINQ, EF, or VB[x] Hooks - Part 2 post of May 3, 2007:

    Aaron and Tim have created Socializer, a Silverlight UI that demonstrates:

    • The Silverlight 1.1 Alpha client
    • LINQ to Objects in Silverlight 1.1
    • LINQ to XML in future Silverlight CTPs [emphasis added]
    • Semantic Web
    • XML, RDF (FOAF)
    • Data binding, querying, and aggregation
    • A socially-aware rich Internet application (RIA) that includes personal content aggregated from MySpace, de.licio.us, and Flickr.

    I didn't get around to researching WCF support in Silverlight 1.1, but Julie found a couple of workarounds for using WCF with the current bits.

    Added: October 30, 2007

    LINQ to SharePoint with Bart de Smet Webcast on October 31

    LINQ to SharePoint developer Bart de Smet will join Glen Gordon and Lynn Langit for a geekSpeak Webcast at Noon PDT on Wednesday, October 31, 2007. Here's Bart's bio from the geekSpeak blog:

    A former Visual C# MVP, Bart De Smet now works at Microsoft Corporation on the WPF dev team in an SDE role. Prior to this new challenge, Bart was active in the Belgian community evangelizing various Microsoft technologies, most of the time focusing on CLR, language innovation and frameworks. In his evangelism role, he's been speaking at various events and attended several international conferences including TechEd Europe, IT Forum and the PDC. In 2005, Bart graduated as a Master of Informatics from Ghent University, Belgium. Two years later, Bart became a Master of Computer Science Software Engineering from the same university.

    Register for the Webcast here.

    Added: October 30, 2007

    Followup Resources for geekSpeak: LINQ to SharePoint with Bart De Smet with a Channel9 link to the clip.

    Updated: November 3, 2007

    New LINQ to Flickr Provider on Codeplex

    MehfuzH has posted a new LINQ to Flicker provider on CodePex.

    His New LINQ provider for Flickr post provides detailed instructions for using the API to select, add, or remove images.

    Added: October 30, 2007