A couple of months ago I posted a script Making webdatagen data-binding friendly that took a .cs file generated by ADO.NET Data Services using webdatagen.exe/datasvcutil.exe and made it data-binding friendly.

David Browne who works for Microsoft in Dallas got in touch having used the script and made a few improvements. Here's the updated script:

Perhaps the best thing about this new version is it is now idempotent and so it can be run as part of a pre-build script. Nice.
David also spotted a little bug where I'd forgotten to escape a '.' so instead the Regex would have treated it as a wildcard.