Channel 9 Interview: LINQ Language Deep Dive with Visual Studio 2008

Ever wonder what really happens when you write a simple LINQ query? Dim query = From row In db.Customers _ Where row.Country = "Canada" _ Select row A lot of new language features went into the compilers in Visual Studio 2008 to make even this simple LINQ query work. In this interview I sit down… Read more

Filtering Entity Framework Collections in Master-Detail Forms

Last post I talked about how to get WPF data binding to work with master-detail entity collections. I had a couple readers ask me how they could filter the child collection instead of bringing them all down so in this post I’d like to show how you could do that. It’s actually pretty easy. Customer… Read more

Implementing Validation in WPF on Entity Framework Entities

I’ve blogged before about implementing validation on LINQ to SQL classes as well as how to customize the display of error messages in WPF. In this post I want to show how you can use these same techniques to validate entities coming from the Entity Framework (EF). Like LINQ to SQL classes, Entity Framework entities… Read more

Community Article: Automate Common Office Tasks

If you haven’t seen it yet, we’ve got a new article from Robert Green (VSTO MVP) up on the Visual Basic and VSTO Dev Centers. In this article, learn how you can use Visual Basic to build application-level add-ins that automate common Microsoft Office tasks. It’s a good introduction to Office development with Visual Studio… Read more

Good Times at DevTeach, Vancouver

Last week I spoke at DevTeach in Vancouver which was held at the beautiful Four Seasons in downtown. I love this Canadian conference because the attendees are great – super friendly and social, and ask a lot of great questions. I mostly interacted with folks building applications for the government or working as consultants and… Read more

Using TableAdapters to Insert Related Data into an MS Access Database

I’ve posted before about how to use TableAdapters to update parent-child (master-detail) relationships against SQL server. It’s pretty straightforward and Visual Studio generates all the code for you to properly insert, update and delete your data. However if you’re using MS Access then there’s one thing that Visual Studio doesn’t do because it’s not supported… Read more

Using the WPF ObservableCollection with EF Entities

The ObservableCollection is a special WPF collection that provides proper notifications to the UI when items are added, removed, or the list is refreshed because it implements INotifyCollectionChanged. It’s common to use this collection (or inherit from it) to contain your business objects you want to bind to in WPF.  Class Window1 Private CustomerData As… Read more

Notifying the UI when Entity References Change in Lookup Comboboxes

Last week I wrote about how to data bind WPF lookup comboboxes to entities returned from the Entity Framework. I described that the key to this type of binding is setting the SelectedItem to the object reference itself on the navigation property instead of setting SelectedValue and SelectedValuePath as in the case when you have… Read more

Data Binding WPF Lookup Combobox Values to EF Entities

It’s extremely common to have to hook up lookup tables on your data entry forms in order to populate foreign keys in a database. I’ve talked about how to do this in Winforms and WPF with Datasets and LINQ to SQL before: How Do I: Create a Lookup Combobox in WPF? How Do I: Create… Read more