Visual Basic Blog

A group blog from members of the VB team

Productivity Improvements for the Entity Framework

BackgroundWe’ve been hearing a lot of good feedback on the recently released update to the Entity Framework in .NET 4. This release marks a significant advancement from the first release that shipped with .NET 3.5 SP1.  I’m not going to spend time here talking about what’s new, but you can check here to see for ...

Using HTML entities in XML Literals (Avner Aharoni)

One of the common use-cases of XML literals is creating HTML. However, HTML entities cannot be used in XML literals since LINQ to XML directly supports only the Data type definitions (DTD) defined in the XML 1.0 spec. You can read more about it here. The workaround is to use the Unicode representation of the entity, although it’s not as ...

Spot the Bug! – The Key to using Anonymous Types (Jonathan Aneja)

This one’s going to be long, but for those of you who’ve felt the first 3 in this series were too easy I promise this one’s tougher J. Let’s say you want to list all the customers from a table in a ComboBox, and update the UI based on which one is selected.  To do this we’ll need to bring back two fields...

Linking Zune media items with LinQ, Part 2 (Matt Gertz)

In this post, I’ll continue on with coding the new playlist shuffler.  If you haven’t read part 1 yet, I highly recommend it so that this post will make more sense. JCode for the controls (continued)The Title TextBoxWhen the title changes, we’ll want to indicate that the playlist has changed, and we’ll want to ...

Linking Zune media items with LinQ, Part 1 (Matt Gertz)

Way back in October 2007, I wrote up a few posts (here and here) on my experiments with the Windows Media Player object model.  The problem I was trying to solve was that, when I had a playlist set to “shuffle,” WMP would break up songs that should always play together (for example, Jackson Browne’s “The Load-Out&...

Dynamic Searching using LINQ – Dataset + Joins

About two years ago I posted some code that shows how to dynamically construct LINQ queries at runtime.  On average there's a couple questions per month about trying it in some edge case, and usually the support already exists within the API.  Recently though someone posted a question that has to do with Datasets and Joins that ...

XML Literals, WCF and LINQ Article by Steele Price (Lisa Feigenbaum)

Steele wrote a great article in last month's issue of Visual Studio Magazine on XML Literals, WCF and LINQ. He shows how to use these three technologies together to produce more responsive ASP.NET pages, and more readable code. Lots of great tips for VB 2008.VSM's "On VB" Column: XML Literals, WCF and LINQ by Steele Price...

Community Article: Scaling ADO.NET DataTables (Beth Massi)

We we released a new community article onto the Visual Basic Developer Center by one of our MVPs, Jeff Certain, called Scaling ADO.NET DataTables. In this article Jeff shows shows us how to query and aggregate data using the built in DataTable methods as well as LINQ to DataSets. He compares the performance on indexed and non indexed ...