Get your WCF client configuration from anywhere 30 July 2010 Diederik-Krols An application that consumes one or more WCF services needs to provide the address, binding protocol, and contract (ABC) of each end point in its app.config file. This article shows an easy way to let the application get its WCF client configuration data from anywhere: a flat file, a database, even ... [More]
Add Search support for Add Reference 11 July 2010 Peter-Himschoot VS2010 Visual Studio 2010 now comes packed with too many assemblies. The list of assemblies to pick from in the Add Reference dialog is now a little too large for my taste. Today, while browsing around in the Visual Studio 2010 Extension Manager, I found the Search References extension: After installin... [More]
Transactions and Connections in Entity Framework 4.0 29 June 2010 Diederik-Krols Entity Framework 4.0, SQL Server This article describes where, why, and how to use TransactionScope in the Entity Framework 4.0. The proposed best practices apply to a medium to large data access layer, e.g. a DAL that is implemented as one or more WCF services with lots of internal calls. Allow me to start with the conclusions: ... [More]
How to implement INotifyPropertyChanged without strings 14 June 2010 Peter-Himschoot .NET Development INotifyPropertyChanged is an interface which is very important to do proper databinding and is heavily used in the MVVM pattern. However, to implement it you have to raise the PropertyChanged event whenever a data-bound property changes value, and you have to pass the name of the property to it. Th... [More]
Farewell father 09 June 2010 Peter-Himschoot Today, at 18h30, my father-in-law Gaston Dhaese passed away after a 9 year battle against cancer. I’ve been told he didn’t suffer any pain, and I am glad he could die in piece with his loving family close by. Dear father, you have always been good and fair to me, my wife Isabelle and our children... [More]
Optimistic concurrency using a SQL DateTime in Entity Framework 4.0 31 May 2010 Diederik-Krols .NET 4.0, Entity Framework 4.0, SQL Server, WPF This article explains how to implement optimistic concurrency checking using a SQL Server DateTime or DateTime2 column. It's a follow-up of my previous article on using a TimeStamp column for that same purpose. In most -if not all- concurrency checking cases it actually makes more sense to use a Dat... [More]
Lambda Curry 24 May 2010 Kris-Vandermotten .NET Note: if you’re looking for lamb curry, you came to the wrong place. This post is about C# programming techniques. Currying a function is a technique named after Haskell Curry, to transform a function with multiple parameters into a series of functions having one parameter each. The technique is im... [More]
Self-Tracking Entities with Validation and Tracking State Change Notification 18 May 2010 Diederik-Krols .NET 4.0, WPF, Entity Framework 4.0 This article explains how to extend Self-Tracking Entities (STE) from Entity Framework (EF) 4.0 with validation logic and (tracking) state change notification, with just minimal impact on the T4 files. We'll build a two-tier application that submits local changes in a WPF application via a WCF servi... [More]
Keeping a file checked out after check-in with Team System 11 May 2010 Peter-Himschoot Team System, VS2010 This week I got a question whether it is still possible to keep some file checked-out during a check-in. This is something you can do with Source Safe for example. To be honest I had no idea if this is possible, so I decided to have a look. So the answer is yes (although in general I think this is d... [More]
Optimistic concurrency using a SQL Timestamp in Entity Framework 4.0 04 May 2010 Diederik-Krols .NET 4.0, WPF, Entity Framework 4.0 This article explains how to implement optimistic concurrency checking in the Entity Framework 4.0, using a SQL Server Timestamp column. But you could have derived that from its title. What is a Timestamp? Despite its name, the SQL Server Timestamp data type has nothing to do with time. DateTime2 ... [More]