ASP.NET IronPython

January 2009 - Posts

Tips on getting your ASP.NET Dynamic Data questions answered quickly
When you run into an issue or have a question about ASP.NET Dynamic Data , the best place for it is the Dynamic Data Forum .  When you write your question, there are a few simple things that you can do to make it easier for the ‘experts’ to answer (and hence to get an answer quicker!). 1. Mention what ORM framework you are using Out of the box, Dynamic Data supports LINQ To SQL and Entity Framework.  While they seem similar on the surface, they are actually fairly different once you get a little deeper into the API.  Just mention which one you’re using and you’ll save a roundtrip. 2. Mention what release you’re using The official release of Dynamic Data is the one that comes with .NET Framework 3.5 SP1 (or Visual Studio 2008 SP1...
A helper to easily set up change notifications in Entity Framework
When you use Entity Framework, you can perform Insert/Update/Delete operations on your entities, and you eventually call ObjectContext.SaveChanges() to actually make it all happen.  The call to SaveChanges() is either explicit, or can happen implicitly when you use the EntityDataSource (e.g. within a Dynamic Data application). Before SaveChanges() actually performs the operations, it gives you a chance to look at the entities, letting you modify them, and possibly cancel certain operations.  Unfortunately, doing this requires using some pretty ugly code, because the API is a little too low level.  Instead of nicely handing you the changes one by one, it just gives you the raw change list and lets you deal with it. For instance...
More Posts