Visual Studio 2008 (code named Orcas) Related Posts by ThinqLinq

LINQ to Entity Visualizer

When demonstrating the LINQ tools, I typically start out showing the LINQ to SQL visualizer that’s available with the C# Samples. Today I saw that Raja Venkatesh has released a Visualizer for ObjectQuery<T> (aka. LINQ to Entities). As you do with the other visualizers, you enable this by simply saving the AnySourceEntityQueryVisualizer.dll to your Visualizers directory. )Note: :the download page specifies to copy it to your C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\Visualizers. However, Windows 7 blocks saving files there by default. Alternatively, you can copy it to your My Documents\Visual Studio 2008\Visualizers.

Once you install it, put a breakpoint after your query is declared. If you hover over the query variable, you should see the magnifying glass indicating the debugger visualizer:

image

Clicking on the magnifying glass brings you to a screen that shows the Expression, projected SQL, and Connection properties. If you click “Execute”, you will see the server log and a grid with the results.

image

If you want to try it out, feel free to download it from the Visual Studio Gallery page for the LINQ to Entity Visualizer. I’ll be adding a linq to this on my LINQ Tool list as well.

Posted on - Comment
Categories: Entity Framework - VS 2008 - Visual Studio -

Win7 and the LINQ to SQL and LINQ to Entity designers

I've been playing with the Windows 7 Beta1 since they came out. So far, I've been really impressed with what I'm seeing. I've installed quite a bit and have put a full development environment on it including Visual Studio 2008 and SQL Server 2008.

So far, the only real thing I've seen is a small bug in the LINQ to SQL and LINQ to Entity Framework design surfaces. In these, if you move the mouse over one of the entities on the designer, the entity may dissappear.

There's a quick work-around for this issue. Simply move the vertical scroll bar down. Once you do that, the entities will remain visible on the design surface. Rest asured, the development team is aware of this glitch and I'm sure there will be a fix for it by the time that the bits ship.

Posted on - Comment
Categories: Entity Framework - LINQ - VS 2008 -

Adding a dynamic SiteMap for search engine optimization using LINQ

A couple months ago I added a feature to this site to build a Site Map for this site dynamically based on the information from the database for posts and files for the downloads. If your not familiar with how Sitemap files can help your site searchability, Google has a good documentation about Sitemaps in their Webmaster tools.

The SiteMap Protocal is a rather simple XML document consisting of a set of url nodes that consist of the following:

  • loc - URL for the page link
  • lastmod - Date the page was last modified
  • changefreq - How often the page is changed
  • priority - How high you think the page should be ranked relative to other pages on your site.

For this site, I decided to index the main (default.aspx) File, about and contact pages. In addition, I indexed each post as a separate url node. If you want to view the resulting data, browse to http://www.thinqlinq.com/sitemap.aspx. To do this, I used LINQ to XML with VB XML Literals. To begin, we need to add the XML Namespaces. At the top of our file, we enter the following imports:

Imports <xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
Imports <xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

We continue by adding the root urlset node and one child node representing the main page:

Dim map = _

    <?xml version='1.0' encoding='UTF-8'?>

    <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9

            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"

        xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

 

        <url>

            <loc>http://www.ThinqLinq.com/default.aspx</loc>

            <lastmod>

               <%= (From p In dc.PostItems _

                    Order By p.PublicationDate Descending) _

            .First.PublicationDate.ToString("yyyy-MM-dd") %>

            </lastmod>

            <changefreq>daily</changefreq>

            <priority>1.0</priority>

        </url>

    </urlset>

 

Most of this is standard XML. The main difference is the use of a LINQ query to show the last modification date based on the most recent post from our database. In this case we just want the First date when the dates are ordered descending. We do need to format it properly so that our search engine (Google) will be able to recognize it.

Next up, we need to add the link for the Downloads page. We'll do this much the same way that we added the url for the default page. However, in this case the modification date won't come from the database, but rather use a LINQ to Objects query to get the most recent file in the downloads directory on this site.

<url>

    <loc>http://www.ThinqLinq.com/Files.aspx</loc>

    <lastmod>

        <%= (From f In New System.IO.DirectoryInfo( _

            Server.MapPath("~/Downloads")).GetFiles _

            Order By f.LastWriteTime Descending) _

            .FirstOrDefault.LastWriteTime.ToString("yyyy-MM-dd") %>

    </lastmod>

    <changefreq>weekly</changefreq>

    <priority>1.0</priority>

</url>

The About and Contact pages are relatively straight forward. The remaining url nodes are generated based on the records in the PostItems from our database. To populate them, we'll create a LINQ query pulling the data from the database using LINQ to SQL and projecting (Select) out individual url nodes for each row in the database:

<%= From p In dc.PostItems.ToList _

    Select <url>

               <loc>http://www.ThinqLinq.com/default/<%= p.TitleUrlRewrite %>.aspx</loc>

               <lastmod><%= p.PublicationDate.ToString("yyyy-MM-dd") %></lastmod>

               <changefreq>daily</changefreq>

               <priority>0.3</priority>

           </url> %>


As you can see, there isn't much here that is overly complex. It's just a series of LINQ queries filling the data from various sources. For reference purposes, Here's the complete code:

Imports <xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

Imports <xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

 

Partial Class SiteMap

    Inherits System.Web.UI.Page

 

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Response.Buffer = True

        Response.Clear()

        Response.Cache.SetCacheability(HttpCacheability.NoCache)

        Response.ContentType = "text/xml"

        Response.AddHeader("Content-Disposition", "inline;filename=blog.rss")

        WriteRss()

        Response.End()

    End Sub

 

    Private Sub WriteRss()

        Try

            Using dc As New LinqBlog.BO.LinqBlogDataContext

                Dim map = _

                    <?xml version='1.0' encoding='UTF-8'?>

                    <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"

                        xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

 

                        <url>

                            <loc>http://www.ThinqLinq.com/default.aspx</loc>

                            <lastmod>

                                <%= (From p In dc.PostItems _

                                    Order By p.PublicationDate Descending) _

                                    .First.PublicationDate.ToString("yyyy-MM-dd") %>

                            </lastmod>

                            <changefreq>daily</changefreq>

                            <priority>1.0</priority>

                        </url>

                        <url>

                            <loc>http://www.ThinqLinq.com/Files.aspx</loc>

                            <lastmod>

                                <%= (From f In New System.IO.DirectoryInfo( _

                                    Server.MapPath("~/Downloads")).GetFiles _

                                    Order By f.LastWriteTime Descending) _

                                    .FirstOrDefault.LastWriteTime.ToString("yyyy-MM-dd") %>

                            </lastmod>

                            <changefreq>weekly</changefreq>

                            <priority>1.0</priority>

                        </url>

                        <url>

                            <loc>http://www.ThinqLinq.com/about.aspx</loc>

                            <lastmod>

                                <%= System.IO.File.GetLastWriteTime( _

                                    Server.MapPath("About.aspx")).ToString("yyyy-MM-dd") %>

                            </lastmod>

                            <changefreq>monthly</changefreq>

                            <priority>1.0</priority>

                        </url>

                        <%= From p In dc.PostItems.ToList _

                            Select <url>

                                       <loc>http://www.ThinqLinq.com/default/<%= p.TitleUrlRewrite %>.aspx</loc>

                                       <lastmod><%= p.PublicationDate.ToString("yyyy-MM-dd") %></lastmod>

                                       <changefreq>daily</changefreq>

                                       <priority>0.3</priority>

                                   </url> %>

 

                        <url>

                            <loc>http://www.ThinqLinq.com/Contact.aspx</loc>

                            <lastmod>2008-02-28</lastmod>

                            <changefreq>never</changefreq>

                            <priority>0.1</priority>

                        </url>

                    </urlset>

                Response.Write(map)

            End Using

        Catch ex As Exception

            Response.Write(<error><%= ex.ToString %></error>)

        End Try

 

    End Sub

End Class

Posted on - Comment
Categories: VB Dev Center - LINQ - VB - VS 2008 - SEO - Linq to XML -

ThinqLinq on Deep Fried Bytes

Deep Fried Bytes logoBack at DevLinq (er DevLink), I had a chance to sit out on the back porch with Keith and Woody and chat about some of the cool features and rusty washers that you can find in LINQ. Head on over to DeepFriedBytes.com and check out our conversation. You can also download the webcast to listen to on demand. Even better, you can listen on your Zune. As always, let me know what you Thinq.
Posted on - Comment
Categories: VB Dev Center - LINQ - VS 2008 -

Early peeks at Visual Studio 2010 and .Net 4.0

Typically, major announcements regarding new versions of the framework are announced at events like PDC. This year, it appears that they're not waiting and are starting to prime the pumps so to speak. Today they have posted a new MSDN site announcing VS 2010 and .Net 4.0 along with a bunch of videos on Channel 9. I typically don't do link posts (just LINQ posts), but wanted to keep them here for my own reference if not anyone else. Enjoy.

Visual Studio 2010 and .NET Framework 4.0 Overview on MSDN

Visual Studio Team System 2010 Week on Channel 9! (20 videos coming this week)

I'm just as interested to see what is to come as you are. If you're in the Atlanta area next week, come on over to the Atlanta MS Pros meeting where we'll discuss how to cope while drinking from the fire hose that is the rate of technology churn that comes out of Microsoft at times.

Posted on - Comment
Categories: VS 2008 -

Enable the Expression Tree Visualizer in VS 2008

In LINQ in Action, we discuss how to add the LINQ to SQL Query visualizer into the Visual Studio 2008 environment. This tool allows you to open a window during debug time to view the TSQL that is generated from the LINQ expression tree. It also allows you to run the query and view the results. If you're not familiar with it, check out this post by Scott Guthrie.

In addition to the query visualizer, you can also build and install the Expression Tree visualizer, not only as a separate application, but also as an integrated visualizer within Visual Studio 2008. To do this, download the Linq Samples from MSDN Code gallery. Inside of that, you can find a project for the ExpressionTreeVisualizer.  To use it as a stand alone utility, build and run the ExpressionTreeVisualizersApplication. This is the method most people are familiar with.

Building the solution will also build the ExpressionTreeVisualizer library. This is the one you need to use to enable it in Visual Studio natively, copy the generated ExpressionTreeVisualizer.dll library and paste it into your ..\Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\Visualizers directory.

Once you have placed the library in the visualizers directory, let's see what you can do to use the new visualizer . First, let's build a LINQ to SQL query:


Dim query = From cust In dc.Customers _
            Where cust.City = "London" _
            Order By cust.CompanyName _
            Select cust
Given this query, we need to access the expression object exposed by the IQueryable query object as follows:

Dim queryExpression = query.Expression

Now, that we have our code set-up, set a breakpoint in your code after you have instantiated this queryExpression variable and debug your project. Now, if you hover over the query.Expression method, you'll see a new magnifying glass as shown below:

 

Clicking on the visualizer icon, will launch the visualizer tool revealing the following screen:

 

Sure, there's lots of information in there. The expression trees are quite complex. This tool helps you decipher them in cases where you need to either parse or dynamically create expression trees in your applications.

Posted on - Comment
Categories: VB Dev Center - LINQ - VS 2008 -

VB Ordering of Anonymous Type Properties change with VS 2008 SP1

The VS 2008 SP1 includes lots of new features (more than a typical service pack, but that's another matter). There are a number of smaller enhancements that could easily go un-noticed otherwise. One of these is to fix a bug in the way the VB compiler generates anonymous types.

In most cases, you will only notice this if you are binding an anonymous projection to a DataGridView or the ASP GridView. With these controls, you will find that the columns used to be generated alphabetically rather than in the order in which they were declared in the anonymous type projection. Consider the following query (using the Northwind Customers table of course):

Dim query = From cust In dc.Customers _
           Select cust.CompanyName, cust.ContactTitle, cust.ContactName, cust.Address

With VS 2008 RTM, a grid bound to these results would display the columns in the following order unless you explicitly set the columns: Address, CompanyName, ContactName, ContactTitle. Notice here that they are listed alphabetically. Interestingly if you use the same query in C#, the columns would be displayed retaining the order of the projection.

To determine the cause for the difference, one must view the actual IL using ILDASM. Comparing the C# with VB IL, you can see that the C# compiler retains the order where-as VB alphabetized it. No, you can't use Lutz's Reflector this time because he too alphabetizes the properties from the IL.

This was true until VS 2008 SP1 which fixed this bug. Now, the anonymous types are generated in the order in which they were declared and the column ordering is retained. Running the same query we had above results in the following column ordering with VB 2008 SP1: CompanyName, ContactTitle, ContactName, Address.

Thanks to the VB team for fixing this bug in the compiler.

Posted on - Comment
Categories: VB Dev Center - LINQ - VB - VS 2008 -

LINQ to SQL on MSDN

While I was away on vacation, Wriju posted a good list of MSDN documents he calls the "LINQ to SQL Missing Manual". It is a good list and addresses a number of items people regularly ask about concerning LINQ. Perhaps the most important ones are:

There are a bunch of other topics over there. If you are using LINQ to SQL, you should definately check it out.

Posted on - Comment
Categories: LINQ - VS 2008 -

Danny Simmons compares the Entity Framework to similar technologies

It seems that everyone else is chiming in on Danny Simmons' recent comparisons of the Entity Framework with other similar technologies. There are several items I wanted to address from his observations.

Regarding the EF vs. LINQ to SQL, he makes two basic points: 1) That there isn't a provider model for other data sources and 2) That LINQ to SQL requires a 1-1 table to object mapping. On the second item, there is no denying the limitation. While you can work around the issue with LINQ to SQL's support for views, stored procs, and functions, this is the key differentiator between LINQ to SQL and the Entity Framework. Danny's statements regarding inheritance limitations and entity splitting both stem back to the TPH (table per hierarchy) limitation of LINQ to SQL.

Regarding the issue with the provider model, the original intent was to have a full provider model which vendors would be able to consume. When the ADO vNext initiatives came out, it was fairly clear that the provider model would be supported in the Entity Framework. As a result, the provider model for LINQ to SQL was essentially shelved. That was the genesis of Matt Warren's series on building an IQueryable provider which basically outlines how one would go about building a provider for LINQ. Since Matt has basically handed the LINQ to SQL code base over to Danny's team, we'll see where this progresses.

In Danny's discussions of other technologies, he seemingly makes two contradictory statements. In the beginning he states,

"... the truth is that different problems merit different solutions."

He then goes on to the statement:

"This makes it easier to create a conceptual model which is how you want to think about your data and then reuse that conceptual model for a number of other services besides just building objects.  Long-term we are working to build EDM awareness into a variety of other Microsoft products so that if you have an Entity Data Model, you should be able to automatically create REST-oriented web services over that model (ADO.Net Data Services aka Astoria), write reports against that model (Reporting Services), synchronize data between a server and an offline client store where the data is moved atomically as entities even if those entities draw from multiple database tables on the server, create workflows from entity-aware building blocks, etc. etc."

By this, he is indicating that the EF should be the defacto mechanism for building the entity structures around which the various components of your system will be built. Thus one tool to answer the various solutions. Is the EF really the best way to expose relational data from a reporting or analysis perspective, time and performance analyses will tell. He does go on in the comments to his post indicating that he is not necessarily advocating re-using the same entities for all of these various application components, but rather to use a similar tooling to create the potentially separate entities that each subsystem will consume. While it makes the programmatic portion easier, the jury is still out on the other areas.

I'm still getting up to speed on the EF, but do have concerns regarding the POCO (Plain Old Class Objects) story and some of the other requirements that the EF puts on your entity and database models.

Posted on - Comment
Categories: LINQ - VS 2008 -

Anonymous Type property ordering in VB

Many people have noticed when binding an anonymous type to a grid in VB that the order of the properties does not reflect the order that they were specified in the projection (Select) clause. Instead, they appear alphabetized. Consider the following query:

Dim query = From c In Customers _
                    Select c.LastName, c.FirstName, c.BirthDate

If you bind this query to a DataGrid or DataGridView and allow the columns to be generated automatically, the results will be displayed with the following column ordering: BirthDate, FirstName, LastName. Notice that the columns are ordered alphabetically based on the property name.

I just received word that this behavior is changing in the next update to VB. After this release, the property order should be retained from the projection clause, just as it is in C#.

Posted on - Comment
Categories: VB Dev Center - LINQ - VB - VS 2008 -

VS 2008 SP1 beta

For those of you who are wanting to live on the bleeding edge, Microsoft has just released a beta for the Visual Studio 2008 Service Pack 1. Soma has a listing of some of the new features that are included in this release on his blog. If you want to skip the description and jump straight to the bits, you should be able to download them here.

For LINQ fans, this release is important as it includes the nearly completed first release of the Entity Framework, ADO.Net Data Services (Astoria), and dynamic data controls. I'll likely start exploring those topics here in the near future, so go ahead and check them out if you haven't seen them before.

This release also points to an important change from previous versions of .NET and Visual Studio in that people are often waiting for a service pack to justify moving to a new technology. This service pack appears to be is coming out much faster than previous versions, so hopefully it will only help to increase adoption. Note that this release is only a beta of the service pack. The final release is still pending at this point.

Posted on - Comment
Categories: VS 2008 -

More on VS 2008 breaking changes

In addition to the items I mentioned in my previous Beta 2 - RTM breaking change list, I found a link on the VS 2008 samples page that a whitepaper has been issued on this. Download the whitepaper at this link: http://download.microsoft.com/download/d/7/e/d7eeb256-5789-411c-a367-c9fda05c2b1c/LINQ_to_SQL_Beta_2_to_RTM_Breaking_Changes.docx

In addition, there is a whitepaper specific to breaking changes between VB 2005 and VB 2008 available here.

Posted on - Comment
Categories: VS 2008 - LINQ -

Visual Studio 2008 Orcas Changes from Beta 2 to RTM

I've just updated the ThinqLinq proof of concept site for the Visual Studio 2008 release that came out today. If you're following the sample application, or are looking for a sample VB 9 implementation of LINQ in a web site, check out the download at http://devauthority.com/files/13/jwooley/entry101097.aspx. In case you are interested, here are the changes that were necessary to move from Beta 2 to the RTM. (The first two items are repeats from my post earlier today).

  • Open the DBML file as XML and change the UTF encoding from 16 to 8. Otherwise the compiler will complain about the DBML file's format. The error you will likely see will be "Build failed due to validation errors in [MyFile.dbml]. Open the file and resolve the issues in the Error List, then try rebuilding the project." When you open the file, you won't see errors in the error list. Just change the encoding and you should be good.
  • Replace the Add methods with InsertOnSubmit. Likewise, change Remove to DeleteOnSubmit. You may be able to do a global search and replace on this, but be careful not to make changes to any IList object implementations, only LINQ to SQL ones.
  • SyndicationFeed.Load removed the option to pass in a URI. Instead, I used SyndicationFeed.Load(New System.Xml.XmlTextReader(UrlString)).
  • The SyndicationFeed's Item PublishDate property is changed to the new DateTimeOffset type rather than the simpler DateTime. As a result, get the date from the PublishDate.Date property.
  • When projecting XML elements as part of a LINQ to SQL query, you no longer need to pre-fetch the results into an array. I'll make a separate post on this item.

That's all I've found so far. I've already updated both the ThinqLinq site and the samples for the upcoming LINQ in Action book. I'm sure I've missed something, but so far, the upgrade is relatively easy this time around. The IDE does appear to be running faster as well.

Posted on - Comment
Categories: VS 2008 - LINQ -

Visual Studio 2008 (Orcas) Changes from Beta 2 to RTM

I've just updated the ThinqLinq proof of concept site for the Visual Studio 2008 release that came out today. If you're following the sample application, or are looking for a sample VB 9 implementation of LINQ in a web site, check out the download at http://www.thinqlinq.com/Downloads/ThinqLinqRtm.zip. In case you are interested, here are the changes that were necessary to move from Beta 2 to the RTM. (The first two items are repeats from my post earlier today).

  • Open the DBML file as XML and change the UTF encoding from 16 to 8. Otherwise the compiler will complain about the DBML file's format. The error you will likely see will be "Build failed due to validation errors in [MyFile.dbml]. Open the file and resolve the issues in the Error List, then try rebuilding the project." When you open the file, you won't see errors in the error list. Just change the encoding and you should be good.
  • Replace the Add methods with InsertOnSubmit. Likewise, change Remove to DeleteOnSubmit. You may be able to do a global search and replace on this, but be careful not to make changes to any IList object implementations, only LINQ to SQL ones.
  • SyndicationFeed.Load removed the option to pass in a URI. Instead, I used SyndicationFeed.Load(New System.Xml.XmlTextReader(UrlString)).
  • The SyndicationFeed's Item PublishDate property is changed to the new DateTimeOffset type rather than the simpler DateTime. As a result, get the date from the PublishDate.Date property.
  • When projecting XML elements as part of a LINQ to SQL query, you no longer need to pre-fetch the results into an array. I'll make a separate post on this item.

That's all I've found so far. I've already updated both the ThinqLinq site and the samples for the upcoming LINQ in Action book. I'm sure I've missed something, but so far, the upgrade is relatively easy this time around. The IDE does appear to be running faster as well.

Posted on - Comment
Categories: VS 2008 -

VS 2008 RTM and the .NET Framework 3.5 Shipped

It's offical, Soma annouced on his blog that the 3.5 .Net Framework along with Visual Studio 2008 have shipped. I have been excited by the things coming with this release since PDC 2005 and am glad to finally work the the official bits. I am aware of a couple breaking changes between the Beta 2 and RTM, and will try to keep you updated as I find more items.

The biggest changes to be aware of in regards to LINQ to SQL are the following:

  • Open the DBML file as XML and change the UTF encoding from 16 to 8. Otherwise the compiler will complain about the DBML file's format.
  • Replace the Add methods with InsertOnSubmit. Likewise, change Remove to DeleteOnSubmit. You may be able to do a global search and replace on this, but be careful not to make changes to any IList object implementations, only LINQ to SQL ones.

There are a couple other minor updates that may catch you off-guard. I'll update you once I've had a chance to play with the final bits.

Posted on - Comment
Categories: VS 2008 -

VS 2008 Beta 2 VPC images will time bomb

If you downloaded the VPC image version of Visual Studio 2008 beta 2, make sure to back-up your data and move anything off of the Team Foundation Server before November 1, 2007. I was just informed that the images will be time bombing on November 1 2007 rather than the originally intended March 15, 2008 date. If you don't download it now, you may not be able to retrieve your projects. More information is available at the VS 2008 beta 2 download site. If you installed the stand-alone version, you should be ok.

Posted on - Comment
Categories: VS 2008 -

Code Camp 2007 downloads

I've uploaded the files for my presentations for the fall Code camp season which I just presented last weekend at the Birmingham, Alabama code camp. If you missed the talks, you can pick up the downloads at the following links. Also, I will be at the Charleston, South Carolina code camp this coming weekend (10/13) so you can catch me there. Additionally, the ThinqLinq talk is still available on the aspnetpodcasts.com. Links to all three parts of the webcasts are available on the file download page.

Below are the links to each of the downloads for my three talks.

These and all of my demos are available via my downloads page.

Posted on - Comment
Categories: Code Camp - LINQ - VB - VS 2008 -

LINQ to SQL changes from Orcas Beta 1 to Visual Studio 2008 Beta 2

I've been working this weekend trying to get my samples for the upcoming Linq In Action book and other demos up and running with the recent Beta 2 drop. Below is a summary of some of the changes that I needed to make. In general, if you are able, I would recommend dumping your data mapping file (dbml) and creating it again at this point as there are lots of changes both to the XML schema and the generated code. If you don't have that luxury, be prepared for a lot of work at this point.

Dinesh has a listing of some of the enhancement areas, but doesn't get into any specifics at this point. I look forward to his revised white paper. I hope it will come out soon to answer the inevitable questions that will be coming.

  • The beginning of the .sln files need to be changed to refer to the new version name. The old SLN files specified "# Visual Studio Codename Orcas". Those references need to be modified to "#Visual Studio 2008". Fellow VB MVP, Bill McCarthy wrote up a quick app to fix your solution files. Grab the code here.
  • Previous versions of the LINQ To Sql designer generated code implemented a System.Data.Linq.INotifyPropertyChanging interface. This has been moved to the System.CompnentModel namespace. Additionally, the generated code now includes nice Partial Method stubs which you can use to add custom logic on your entities.
  • The attribute mapping declarations have been moved from the System.Data.Linq namespace to System.Data.Linq.Mapping. You can add a global import, but the designer adds fully qualified namespaces, so you will need to make these changes with copy/replace.
  • The Func type has been moved from System.Linq.Func to System.Func
  • The EntitySet has moved from System.Linq to System.Data.Linq
  • Two of the Column mapping attribute parameters have changed their casing: DBType is now DbType and IsDBGenerated is now IsDbGenerated.
  • There are a number of changes in relation to Stored Procedure and Function calling.
    • Most notably, the StoredProcedure attribue has been removed.
    • You can use the Function attribute for both attributes and functions now.
    • ExecuteMethodCall no longer appears to have a generic implementation.
    • IExecuteResults is changed to IExecuteResult.
  • Assembly references have moved their file location and version number. Thus, you may need to drop and re add your references to System.Core, System.Data.Linq, System.Xml.Linq, System.ServiceModel, etc.

I know this list is far from complete, but I hope it helps some of you.

Posted on - Comment
Categories: LINQ - VS 2008 -