Julie Lerman's DevLife

DevLife Part I [May 2005 - March 2007]

My Links

Blog Stats

News

A blog for DevSource.com.

This blog was originally part of the blogs.ziffdavis.com site from May 2005 through June 2007 when the blog was moved to the Movable Type blog engine and hosted at blog.devsource.com/devlife.
The original blog was eventually shut down and I was given the posts so that I could host them on my own site.


Archives

Monday, March 05, 2007 #

LINQ and Entity Framework Resources for March Orcas CTP

The March CTP (Community Tech Preview) of the next version of Visual Studio (code named “Orcas”) was released last week. See my previous post for links to get the download.

After I finally got the humongous VPC downloaded and installed, I have been working in it non-stop; focusing on Entity Framework in ADO.NET and LINQ to Entities and LINQ to SQL. I am just bringing my head up for air and wanted to share some of the great discussions and resources that I have found useful when working with all of this.

LINQ to SQL

The “101 LINQ Samples“ Solution (which is really a LOT more than 100) has been updated along with a bunch of other LINQ Samples (all of this is in C#, still waiting on VB). Charlie Calvert posted them on his blog. They did not make it into the CTP. For a quick and very helpful video introduction of what's in there, see the second  blog post.

http://blogs.msdn.com/charlie/archive/2007/03/04/samples-update.aspx

http://blogs.msdn.com/charlie/archive/2007/03/05/march-ctp-samples-overview-video.aspx

 

Mike Taulty has been writing some great posts. Here are a few of them, but cruise around all of his newest posts for more goodies.

 

LINQ to SQL Object Tracking and  Turning off LazyLoading 
http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2007/03/02/9142.aspx

 

LINQ to SQL Stored Procedures (C#)
http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2007/03/03/9145.aspx

 

I wrote a related post with VB code

http://www.thedatafarm.com/blog/2007/03/05/StoredProcsInLINQToSQLInMarchCTPTheVBVersion.aspx

 

Join problems that stemmed from importing previous CTP code into the new CTP. This carried over some earlier DLLs and gave me wierd problems with joins in C# and VB. Jim Wooley came to my rescue. Here's the forum thread. http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1300672&SiteID=1

 

LINQ to DataSet

 

Disappearance of ToDataTable and LoadSequence (allowing you to create a DataTable from [I think any LINQ] query result) seem to have disappeared (one of Mike Taulty's post is a hack to make up for it) but CopyToDataTable is in there for LINQ to DataSet. The query result of a LINQ to DataSet query is DataRows and CopyToDatatable can merger those DataRows into a DataTable. There are some examle of this in the LINQ Smaples on Charlie's blog. Here's a forum thread where it was discussed.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1300671&SiteID=1

 

 

Problems with AsEnumerable? I had a dreadful problem with DataTable.AsEnumerable (makes a DataTable queryable). Luckily I found this great post from Angel Saenz-Badillos (who used to save my butt on Query Notification problems!) where he described the problem and at the bottom of the post, reveals the cause which was not having references to the correct DLLs. Note that in this CTP, these DLLs are not in the GAC. You have to go into c:\windows\microsoft.net\framework\3.5.20209 to find them.

http://blogs.msdn.com/angelsb/archive/2007/02/23/does-not-contain-a-definition-for.aspx

 

Entity Framework

 

gone. The docs are updated and explain how to add constraints to Entity properties beyond the simple facets using but the docs are wrong. Check Constraint does not exist. Too bad!

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1301414&SiteID=1

 

Primary Keys which are also a Foreign Key

When building schemas with the wizard, if you have a primary key on a table and  you are also using the primary key as a foreign key to another table, the pkfk relationsihp won't get added into the storage schema. Here's an explanation.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1287163&SiteID=1

 

Many to Many Mapping in EDM

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1285818&SiteID=1

 

Object Services & Stored Procs

Bob Beachemin created samples for doing Sprocs within Object Services.

http://www.sqlskills.com/blogs/bobb/2007/03/04/UsingStoredProceduresWithEDMObjectServicesInTheMarchCTPWithCode.aspx

 

Entity Framework Terminology
There is a lot of great stuff in the docs in the CTP. John Papa surfaces a goodie:

http://codebetter.com/blogs/john.papa/archive/2007/03/03/Entity-Framework-Terminology.aspx

 

Blogs:

Here are recommended blogs of people who are banging furiously on these areas of these new bits. (I'm sure there are more, but these are where I've been lately)

 

Roger Jennings

Bob Beauchemin

John Papa

Jim Wooley

 

And always watch:

ADO.NET Team Blog

Data team blog

ADO.NET Orcas Forums

LINQ Forums

posted @ 9:01 PM